diff --git a/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java index a35cfdd..2a077fc 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java @@ -100,7 +100,7 @@ public class ArticleServiceImpl extends AbstractService
implements Arti } @Override - @Transactional(rollbackFor = { UnsupportedEncodingException.class,BaseApiException.class }) + @Transactional(rollbackFor = { UnsupportedEncodingException.class, BaseApiException.class }) public Map postArticle(ArticleDTO article, HttpServletRequest request) throws UnsupportedEncodingException, BaseApiException { Map map = new HashMap(1); if(StringUtils.isBlank(article.getArticleTitle())){ @@ -263,7 +263,7 @@ public class ArticleServiceImpl extends AbstractService
implements Arti return list; } - private ArticleDTO genArticle(ArticleDTO article,Integer type) { + private ArticleDTO genArticle(ArticleDTO article, Integer type) { Author author = articleMapper.selectAuthor(article.getArticleAuthorId()); article.setArticleAuthor(author); article.setTimeAgo(Utils.getTimeAgo(article.getUpdatedTime())); diff --git a/src/main/java/com/rymcu/vertical/service/impl/JavaMailServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/JavaMailServiceImpl.java index 7c3bc57..d5c0395 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/JavaMailServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/JavaMailServiceImpl.java @@ -48,7 +48,8 @@ public class JavaMailServiceImpl implements JavaMailService { private String USERNAME; @Value("${spring.mail.password}") private String PASSWORD; - private final static String BASE_URL = "https://rymcu.com"; + @Value("${resource.domain}") + private String BASE_URL; @Override public Integer sendEmailCode(String email) throws MessagingException { diff --git a/src/main/java/com/rymcu/vertical/util/BaiDuUtils.java b/src/main/java/com/rymcu/vertical/util/BaiDuUtils.java index 9dd5239..262c558 100644 --- a/src/main/java/com/rymcu/vertical/util/BaiDuUtils.java +++ b/src/main/java/com/rymcu/vertical/util/BaiDuUtils.java @@ -11,8 +11,9 @@ import java.util.concurrent.*; */ public class BaiDuUtils { - private static String token = "9cdKR6bVCJzxDEJS"; - private static String site = "https://rymcu.com"; + private final static String token = "9cdKR6bVCJzxDEJS"; + + private final static String site = "https://rymcu.com"; public static void sendSEOData(String permalink) { if (StringUtils.isBlank(permalink) || StringUtils.isBlank(token)) {