模块化拆分
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,5 +4,5 @@
|
|||||||
target/
|
target/
|
||||||
|
|
||||||
# 本地项目的私有文件
|
# 本地项目的私有文件
|
||||||
src/main/resources/application-dev.properties
|
blog-deploy/src/main/resources/application-dev.properties
|
||||||
src/main/resources/application-prod.properties
|
src/main/resources/application-prod.properties
|
||||||
|
|||||||
50
blog-article/pom.xml
Normal file
50
blog-article/pom.xml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>blog</artifactId>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>blog-article</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>13</maven.compiler.source>
|
||||||
|
<maven.compiler.target>13</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-common</artifactId>
|
||||||
|
<version>${blog-common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-user</artifactId>
|
||||||
|
<version>${blog-user.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--MarkDown 2 html -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.youbenzi</groupId>
|
||||||
|
<artifactId>MDTool</artifactId>
|
||||||
|
<version>1.2.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.minidev</groupId>
|
||||||
|
<artifactId>json-smart</artifactId>
|
||||||
|
<version>2.4.7</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package cn.celess.blog.controller;
|
package cn.celess.article.controller;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.article.util.SitemapGenerateUtil;
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.model.ArticleModel;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.entity.request.ArticleReq;
|
import cn.celess.common.entity.dto.ArticleReq;
|
||||||
import cn.celess.blog.service.ArticleService;
|
import cn.celess.common.entity.vo.ArticleModel;
|
||||||
import cn.celess.blog.util.RedisUserUtil;
|
import cn.celess.common.service.ArticleService;
|
||||||
import cn.celess.blog.util.SitemapGenerateUtil;
|
import cn.celess.user.util.RedisUserUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -1,25 +1,26 @@
|
|||||||
package cn.celess.blog.service.serviceimpl;
|
package cn.celess.article.serviceimpl;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.enmu.RoleEnum;
|
import cn.celess.common.enmu.RoleEnum;
|
||||||
import cn.celess.blog.entity.*;
|
import cn.celess.common.entity.*;
|
||||||
import cn.celess.blog.entity.model.ArticleModel;
|
import cn.celess.common.entity.dto.ArticleReq;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.ArticleModel;
|
||||||
import cn.celess.blog.entity.request.ArticleReq;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.exception.MyException;
|
import cn.celess.common.exception.MyException;
|
||||||
import cn.celess.blog.mapper.*;
|
import cn.celess.common.mapper.*;
|
||||||
import cn.celess.blog.service.ArticleService;
|
import cn.celess.common.service.ArticleService;
|
||||||
import cn.celess.blog.service.UserService;
|
import cn.celess.common.service.UserService;
|
||||||
import cn.celess.blog.util.ModalTrans;
|
import cn.celess.common.util.ModalTrans;
|
||||||
import cn.celess.blog.util.RedisUserUtil;
|
import cn.celess.common.util.RegexUtil;
|
||||||
import cn.celess.blog.util.RegexUtil;
|
import cn.celess.common.util.StringFromHtmlUtil;
|
||||||
import cn.celess.blog.util.StringFromHtmlUtil;
|
import cn.celess.user.util.RedisUserUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.youbenzi.mdtool.tool.MDTool;
|
import com.youbenzi.mdtool.tool.MDTool;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -249,6 +250,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = {"article"}, key = "'retrieveOneById'+#articleId")
|
||||||
public ArticleModel retrieveOneById(long articleId, boolean is4update) {
|
public ArticleModel retrieveOneById(long articleId, boolean is4update) {
|
||||||
Article article = articleMapper.findArticleById(articleId);
|
Article article = articleMapper.findArticleById(articleId);
|
||||||
if (article == null) {
|
if (article == null) {
|
||||||
@@ -300,6 +302,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = {"article"}, key = "'retrievePageForOpen:'+#page+':'+#count")
|
||||||
public PageData<ArticleModel> retrievePageForOpen(int count, int page) {
|
public PageData<ArticleModel> retrievePageForOpen(int count, int page) {
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
List<Article> articleList = articleMapper.findAllByOpen(true);
|
List<Article> articleList = articleMapper.findAllByOpen(true);
|
||||||
@@ -314,6 +317,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = {"article"}, key = "'findByCategory:'+#name")
|
||||||
public PageData<ArticleModel> findByCategory(String name, int page, int count) {
|
public PageData<ArticleModel> findByCategory(String name, int page, int count) {
|
||||||
Category category = categoryMapper.findCategoryByName(name);
|
Category category = categoryMapper.findCategoryByName(name);
|
||||||
if (category == null) {
|
if (category == null) {
|
||||||
@@ -333,6 +337,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = {"article"}, key = "'findByTag:'+#name")
|
||||||
public PageData<ArticleModel> findByTag(String name, int page, int count) {
|
public PageData<ArticleModel> findByTag(String name, int page, int count) {
|
||||||
Tag tag = tagMapper.findTagByName(name);
|
Tag tag = tagMapper.findTagByName(name);
|
||||||
if (tag == null) {
|
if (tag == null) {
|
||||||
@@ -350,6 +355,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||||||
return new PageData<>(new PageInfo<>(articleByTag), modelList);
|
return new PageData<>(new PageInfo<>(articleByTag), modelList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ArticleModel setPreAndNextArticle(ArticleModel articleModel) {
|
private ArticleModel setPreAndNextArticle(ArticleModel articleModel) {
|
||||||
if (articleModel == null) {
|
if (articleModel == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.article.util;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Article;
|
|
||||||
import cn.celess.blog.mapper.ArticleMapper;
|
import cn.celess.common.entity.Article;
|
||||||
|
import cn.celess.common.mapper.ArticleMapper;
|
||||||
|
import cn.celess.common.util.DateFormatUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@@ -36,6 +38,7 @@ public class SitemapGenerateUtil {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ArticleMapper articleMapper;
|
ArticleMapper articleMapper;
|
||||||
|
|
||||||
@Value("${sitemap.path}")
|
@Value("${sitemap.path}")
|
||||||
private String path;
|
private String path;
|
||||||
private Map<String, String> urlList;
|
private Map<String, String> urlList;
|
||||||
@@ -100,7 +103,7 @@ public class SitemapGenerateUtil {
|
|||||||
urlList.put("https://www.celess.cn", DateFormatUtil.getForXmlDate(new Date()));
|
urlList.put("https://www.celess.cn", DateFormatUtil.getForXmlDate(new Date()));
|
||||||
urlList.put("https://www.celess.cn/links", DateFormatUtil.getForXmlDate(new Date()));
|
urlList.put("https://www.celess.cn/links", DateFormatUtil.getForXmlDate(new Date()));
|
||||||
urlList.put("https://www.celess.cn/leaveMsg", DateFormatUtil.getForXmlDate(new Date()));
|
urlList.put("https://www.celess.cn/leaveMsg", DateFormatUtil.getForXmlDate(new Date()));
|
||||||
List<Article> articles = articleMapper.findAll().stream().filter(article -> article.getOpen()&&!article.isDeleted()).collect(Collectors.toList());
|
List<Article> articles = articleMapper.findAll().stream().filter(article -> article.getOpen() && !article.isDeleted()).collect(Collectors.toList());
|
||||||
articles.forEach(article -> {
|
articles.forEach(article -> {
|
||||||
urlList.put("https://www.celess.cn/article/" + article.getId(), DateFormatUtil.getForXmlDate(
|
urlList.put("https://www.celess.cn/article/" + article.getId(), DateFormatUtil.getForXmlDate(
|
||||||
article.getUpdateDate() == null ? article.getPublishDate() : article.getUpdateDate()));
|
article.getUpdateDate() == null ? article.getPublishDate() : article.getUpdateDate()));
|
||||||
@@ -108,4 +111,3 @@ public class SitemapGenerateUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
31
blog-categorytag/pom.xml
Normal file
31
blog-categorytag/pom.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>blog</artifactId>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>blog-categorytag</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>13</maven.compiler.source>
|
||||||
|
<maven.compiler.target>13</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-common</artifactId>
|
||||||
|
<version>${blog-common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.celess.blog.controller;
|
package cn.celess.categorytag.controller;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.service.CategoryService;
|
import cn.celess.common.service.CategoryService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.celess.blog.controller;
|
package cn.celess.categorytag.controller;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.entity.model.TagModel;
|
import cn.celess.common.entity.vo.TagModel;
|
||||||
import cn.celess.blog.service.TagService;
|
import cn.celess.common.service.TagService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package cn.celess.blog.service.serviceimpl;
|
package cn.celess.categorytag.serviceimpl;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.Article;
|
import cn.celess.common.entity.Article;
|
||||||
import cn.celess.blog.entity.Category;
|
import cn.celess.common.entity.Category;
|
||||||
import cn.celess.blog.entity.model.ArticleModel;
|
import cn.celess.common.entity.vo.ArticleModel;
|
||||||
import cn.celess.blog.entity.model.CategoryModel;
|
import cn.celess.common.entity.vo.CategoryModel;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.exception.MyException;
|
import cn.celess.common.exception.MyException;
|
||||||
import cn.celess.blog.mapper.ArticleMapper;
|
import cn.celess.common.mapper.ArticleMapper;
|
||||||
import cn.celess.blog.mapper.CategoryMapper;
|
import cn.celess.common.mapper.CategoryMapper;
|
||||||
import cn.celess.blog.service.CategoryService;
|
import cn.celess.common.service.CategoryService;
|
||||||
import cn.celess.blog.util.ModalTrans;
|
import cn.celess.common.util.ModalTrans;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
package cn.celess.blog.service.serviceimpl;
|
package cn.celess.categorytag.serviceimpl;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
|
||||||
import cn.celess.blog.entity.ArticleTag;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.Tag;
|
import cn.celess.common.entity.ArticleTag;
|
||||||
import cn.celess.blog.entity.model.ArticleModel;
|
import cn.celess.common.entity.Tag;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.entity.model.TagModel;
|
import cn.celess.common.entity.vo.TagModel;
|
||||||
import cn.celess.blog.exception.MyException;
|
import cn.celess.common.exception.MyException;
|
||||||
import cn.celess.blog.mapper.ArticleMapper;
|
import cn.celess.common.mapper.ArticleMapper;
|
||||||
import cn.celess.blog.mapper.ArticleTagMapper;
|
import cn.celess.common.mapper.ArticleTagMapper;
|
||||||
import cn.celess.blog.mapper.TagMapper;
|
import cn.celess.common.mapper.TagMapper;
|
||||||
import cn.celess.blog.service.TagService;
|
import cn.celess.common.service.TagService;
|
||||||
import cn.celess.blog.util.ModalTrans;
|
import cn.celess.common.util.ModalTrans;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
38
blog-comment/pom.xml
Normal file
38
blog-comment/pom.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>blog</artifactId>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>blog-comment</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>13</maven.compiler.source>
|
||||||
|
<maven.compiler.target>13</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-common</artifactId>
|
||||||
|
<version>${blog-common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-user</artifactId>
|
||||||
|
<version>${blog-user.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.celess.blog.controller;
|
package cn.celess.comment.controller;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.entity.request.CommentReq;
|
import cn.celess.common.entity.dto.CommentReq;
|
||||||
import cn.celess.blog.service.CommentService;
|
import cn.celess.common.service.CommentService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
package cn.celess.blog.service.serviceimpl;
|
package cn.celess.comment.serviceimpl;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.CommentStatusEnum;
|
import cn.celess.common.enmu.CommentStatusEnum;
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.Comment;
|
import cn.celess.common.entity.Comment;
|
||||||
import cn.celess.blog.entity.User;
|
import cn.celess.common.entity.User;
|
||||||
import cn.celess.blog.entity.model.CommentModel;
|
import cn.celess.common.entity.dto.CommentReq;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.CommentModel;
|
||||||
import cn.celess.blog.entity.request.CommentReq;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.exception.MyException;
|
import cn.celess.common.exception.MyException;
|
||||||
import cn.celess.blog.mapper.ArticleMapper;
|
import cn.celess.common.mapper.ArticleMapper;
|
||||||
import cn.celess.blog.mapper.CommentMapper;
|
import cn.celess.common.mapper.CommentMapper;
|
||||||
import cn.celess.blog.mapper.UserMapper;
|
import cn.celess.common.mapper.UserMapper;
|
||||||
import cn.celess.blog.service.CommentService;
|
import cn.celess.common.service.CommentService;
|
||||||
import cn.celess.blog.util.ModalTrans;
|
import cn.celess.common.util.ModalTrans;
|
||||||
import cn.celess.blog.util.RedisUserUtil;
|
import cn.celess.user.util.RedisUserUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -21,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
91
blog-common/pom.xml
Normal file
91
blog-common/pom.xml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>blog</artifactId>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>blog-common</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--druid-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.2.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- mybatis -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
<version>2.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- pageHelper -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
<version>1.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Email-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- TODO: remove this -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qiniu</groupId>
|
||||||
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
|
<version>[7.2.0, 7.2.99]</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- redis -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.htmlunit</groupId>
|
||||||
|
<artifactId>htmlunit</artifactId>
|
||||||
|
<version>2.45.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- protostuff序列化依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.dyuproject.protostuff</groupId>
|
||||||
|
<artifactId>protostuff-core</artifactId>
|
||||||
|
<version>1.1.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.dyuproject.protostuff</groupId>
|
||||||
|
<artifactId>protostuff-runtime</artifactId>
|
||||||
|
<version>1.1.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package cn.celess.common.config;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@MapperScan("cn.celess.common.mapper")
|
||||||
|
public class MybatisConfig {
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.enmu;
|
package cn.celess.common.enmu;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.enmu;
|
package cn.celess.common.enmu;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.enmu;
|
package cn.celess.common.enmu;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.enmu;
|
package cn.celess.common.enmu;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ import java.util.List;
|
|||||||
* @date : 2019/03/28 14:51
|
* @date : 2019/03/28 14:51
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class Article {
|
public class Article implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 小海
|
* @Author: 小海
|
||||||
* @Date: 2020-05-24 14:52
|
* @Date: 2020-05-24 14:52
|
||||||
@@ -12,7 +14,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ArticleTag {
|
public class ArticleTag implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private Article article;
|
private Article article;
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/03/28 22:18
|
* @date : 2019/03/28 22:18
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Category extends TagCategory {
|
public class Category extends TagCategory implements Serializable {
|
||||||
public Category(String name) {
|
public Category(String name) {
|
||||||
super.setName(name);
|
super.setName(name);
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,7 +11,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class Comment {
|
public class Comment implements Serializable {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 友链
|
* 友链
|
||||||
*
|
*
|
||||||
@@ -9,7 +11,7 @@ import lombok.Data;
|
|||||||
* @date : 2019/05/12 11:33
|
* @date : 2019/05/12 11:33
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class PartnerSite {
|
public class PartnerSite implements Serializable {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/03/28 22:19
|
* @date : 2019/03/28 22:19
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Tag extends TagCategory {
|
public class Tag extends TagCategory implements Serializable {
|
||||||
|
|
||||||
public Tag(String name) {
|
public Tag(String name) {
|
||||||
super.setName(name);
|
super.setName(name);
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 小海
|
* @Author: 小海
|
||||||
* @Date: 2020-05-24 14:03
|
* @Date: 2020-05-24 14:03
|
||||||
* @Desc:
|
* @Desc:
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class TagCategory {
|
public class TagCategory implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +13,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class User {
|
public class User implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -9,7 +10,7 @@ import java.util.Date;
|
|||||||
* @date : 2019/04/02 22:14
|
* @date : 2019/04/02 22:14
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class Visitor {
|
public class Visitor implements Serializable {
|
||||||
|
|
||||||
private long id;
|
private long id;
|
||||||
private String ip;
|
private String ip;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.entity;
|
package cn.celess.common.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -9,7 +10,7 @@ import java.util.Date;
|
|||||||
* @date : 2019/05/12 11:29
|
* @date : 2019/05/12 11:29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WebUpdate {
|
public class WebUpdate implements Serializable {
|
||||||
|
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/06/01 22:46
|
* @date : 2019/06/01 22:46
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ArticleReq {
|
public class ArticleReq implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String title;
|
private String title;
|
||||||
private String mdContent;
|
private String mdContent;
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/06/02 10:35
|
* @date : 2019/06/02 10:35
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class CommentReq {
|
public class CommentReq implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String content;
|
private String content;
|
||||||
private long pid = -1;
|
private long pid = -1;
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2020/07/31 20:50
|
* @date : 2020/07/31 20:50
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class LinkApplyReq {
|
public class LinkApplyReq implements Serializable {
|
||||||
private String name;
|
private String name;
|
||||||
private String email;
|
private String email;
|
||||||
private String url;
|
private String url;
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/06/02 11:40
|
* @date : 2019/06/02 11:40
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class LinkReq {
|
public class LinkReq implements Serializable {
|
||||||
private long id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
private String url;
|
private String url;
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/06/01 22:47
|
* @date : 2019/06/01 22:47
|
||||||
@@ -11,7 +13,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class LoginReq {
|
public class LoginReq implements Serializable {
|
||||||
private String email;
|
private String email;
|
||||||
private String password;
|
private String password;
|
||||||
/**
|
/**
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
package cn.celess.blog.entity.request;
|
package cn.celess.common.entity.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 小海
|
* @Author: 小海
|
||||||
* @Date: 2019/09/06 13:33
|
* @Date: 2019/09/06 13:33
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class UserReq {
|
public class UserReq implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String email;
|
private String email;
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Tag;
|
import cn.celess.common.entity.Tag;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +13,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ArticleModel {
|
public class ArticleModel implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,7 +15,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class CategoryModel {
|
public class CategoryModel implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,7 +12,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
public class CommentModel {
|
public class CommentModel implements Serializable {
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
private UserModel fromUser;
|
private UserModel fromUser;
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,7 +16,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class PageData<T> {
|
public class PageData<T> implements Serializable {
|
||||||
|
|
||||||
private List<T> list;
|
private List<T> list;
|
||||||
|
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/04/21 22:43
|
* @date : 2019/04/21 22:43
|
||||||
*/
|
*/
|
||||||
public class QiniuResponse {
|
public class QiniuResponse implements Serializable {
|
||||||
public String key;
|
public String key;
|
||||||
public String hash;
|
public String hash;
|
||||||
public String bucket;
|
public String bucket;
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,7 +15,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class TagModel {
|
public class TagModel implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
@@ -1,16 +1,18 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.UserAccountStatusEnum;
|
import cn.celess.common.enmu.UserAccountStatusEnum;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/04/22 23:13
|
* @date : 2019/04/22 23:13
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class UserModel {
|
public class UserModel implements Serializable {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/05/05 16:05
|
* @date : 2019/05/05 16:05
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class VisitorModel {
|
public class VisitorModel implements Serializable {
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
private String ip;
|
private String ip;
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
package cn.celess.blog.entity.model;
|
package cn.celess.common.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
* @date : 2019/05/12 11:32
|
* @date : 2019/05/12 11:32
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class WebUpdateModel {
|
public class WebUpdateModel implements Serializable {
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
private String info;
|
private String info;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.celess.blog.exception;
|
package cn.celess.common.exception;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.service.MailService;
|
import cn.celess.common.service.MailService;
|
||||||
import cn.celess.blog.util.DateFormatUtil;
|
import cn.celess.common.util.DateFormatUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
|||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +28,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
@ControllerAdvice
|
@ControllerAdvice
|
||||||
public class ExceptionHandle {
|
public class ExceptionHandle {
|
||||||
public static final Logger logger = LoggerFactory.getLogger(ExceptionHandle.class);
|
public static final Logger logger = LoggerFactory.getLogger(ExceptionHandle.class);
|
||||||
@Autowired
|
@Resource
|
||||||
MailService mailService;
|
MailService mailService;
|
||||||
@Autowired
|
@Autowired
|
||||||
HttpServletRequest request;
|
HttpServletRequest request;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.exception;
|
package cn.celess.common.exception;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Article;
|
import cn.celess.common.entity.Article;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -41,8 +42,10 @@ public interface ArticleMapper {
|
|||||||
|
|
||||||
List<Article> findAll();
|
List<Article> findAll();
|
||||||
|
|
||||||
|
@Cacheable(value = {"articleDao"}, key = "'getPreArticle:'+#id")
|
||||||
Article getPreArticle(Long id);
|
Article getPreArticle(Long id);
|
||||||
|
|
||||||
|
@Cacheable(value = {"articleDao"}, key = "'getNextArticle:'+#id")
|
||||||
Article getNextArticle(Long id);
|
Article getNextArticle(Long id);
|
||||||
|
|
||||||
int updateReadingNumber(long id);
|
int updateReadingNumber(long id);
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.ArticleTag;
|
import cn.celess.common.entity.ArticleTag;
|
||||||
import cn.celess.blog.entity.Tag;
|
import cn.celess.common.entity.Tag;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Category;
|
import cn.celess.common.entity.Category;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Comment;
|
import cn.celess.common.entity.Comment;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.PartnerSite;
|
import cn.celess.common.entity.PartnerSite;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Tag;
|
import cn.celess.common.entity.Tag;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.User;
|
import cn.celess.common.entity.User;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.Visitor;
|
import cn.celess.common.entity.Visitor;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.mapper;
|
package cn.celess.common.mapper;
|
||||||
|
|
||||||
import cn.celess.blog.entity.WebUpdate;
|
import cn.celess.common.entity.WebUpdate;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.ArticleModel;
|
import cn.celess.common.entity.dto.ArticleReq;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.ArticleModel;
|
||||||
import cn.celess.blog.entity.request.ArticleReq;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.CategoryModel;
|
import cn.celess.common.entity.vo.CategoryModel;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.CommentModel;
|
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.dto.CommentReq;
|
||||||
import cn.celess.blog.entity.request.CommentReq;
|
import cn.celess.common.entity.vo.CommentModel;
|
||||||
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import org.springframework.mail.SimpleMailMessage;
|
import org.springframework.mail.SimpleMailMessage;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.PartnerSite;
|
import cn.celess.common.entity.PartnerSite;
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.dto.LinkApplyReq;
|
||||||
import cn.celess.blog.entity.request.LinkApplyReq;
|
import cn.celess.common.entity.dto.LinkReq;
|
||||||
import cn.celess.blog.entity.request.LinkReq;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.QiniuResponse;
|
import cn.celess.common.entity.vo.QiniuResponse;
|
||||||
import com.qiniu.storage.model.FileInfo;
|
import com.qiniu.storage.model.FileInfo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.entity.model.TagModel;
|
import cn.celess.common.entity.vo.TagModel;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.dto.LoginReq;
|
||||||
import cn.celess.blog.entity.model.UserModel;
|
import cn.celess.common.entity.dto.UserReq;
|
||||||
import cn.celess.blog.entity.request.LoginReq;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.entity.request.UserReq;
|
import cn.celess.common.entity.vo.UserModel;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.PageData;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
import cn.celess.blog.entity.model.VisitorModel;
|
import cn.celess.common.entity.vo.VisitorModel;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.celess.blog.service;
|
package cn.celess.common.service;
|
||||||
|
|
||||||
import cn.celess.blog.entity.model.PageData;
|
|
||||||
import cn.celess.blog.entity.model.WebUpdateModel;
|
import cn.celess.common.entity.vo.PageData;
|
||||||
|
import cn.celess.common.entity.vo.WebUpdateModel;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
import javax.xml.datatype.DatatypeConfigurationException;
|
import javax.xml.datatype.DatatypeConfigurationException;
|
||||||
import javax.xml.datatype.DatatypeFactory;
|
import javax.xml.datatype.DatatypeFactory;
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
|
|
||||||
import com.gargoylesoftware.htmlunit.BrowserVersion;
|
import com.gargoylesoftware.htmlunit.BrowserVersion;
|
||||||
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
|
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
|
||||||
|
import com.gargoylesoftware.htmlunit.Page;
|
||||||
import com.gargoylesoftware.htmlunit.WebClient;
|
import com.gargoylesoftware.htmlunit.WebClient;
|
||||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||||
import okhttp3.OkHttpClient;
|
|
||||||
import okhttp3.Request;
|
|
||||||
import okhttp3.Response;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 小海
|
* @Author: 小海
|
||||||
@@ -17,15 +15,20 @@ import java.util.Objects;
|
|||||||
* @Desc:
|
* @Desc:
|
||||||
*/
|
*/
|
||||||
public class HttpUtil {
|
public class HttpUtil {
|
||||||
private static final OkHttpClient CLIENT = new OkHttpClient();
|
|
||||||
|
|
||||||
public static String get(String urlStr) {
|
public static String get(String urlStr) {
|
||||||
Request request = new Request.Builder()
|
try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) {
|
||||||
.url(urlStr)
|
webClient.getOptions().setCssEnabled(false);
|
||||||
.get()
|
webClient.getOptions().setJavaScriptEnabled(false);
|
||||||
.build();
|
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
|
||||||
try (Response response = CLIENT.newCall(request).execute()) {
|
webClient.getOptions().setThrowExceptionOnScriptError(false);
|
||||||
return Objects.requireNonNull(response.body()).string();
|
webClient.getOptions().setDownloadImages(false);
|
||||||
|
webClient.getOptions().setActiveXNative(false);
|
||||||
|
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
|
||||||
|
Page clientPage = webClient.getPage(urlStr);
|
||||||
|
if (clientPage.isHtmlPage()) {
|
||||||
|
return clientPage.toString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -33,7 +36,7 @@ public class HttpUtil {
|
|||||||
|
|
||||||
|
|
||||||
public static String getAfterRendering(String url) {
|
public static String getAfterRendering(String url) {
|
||||||
try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) {
|
try (final WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED)) {
|
||||||
webClient.getOptions().setCssEnabled(false);
|
webClient.getOptions().setCssEnabled(false);
|
||||||
webClient.getOptions().setJavaScriptEnabled(true);
|
webClient.getOptions().setJavaScriptEnabled(true);
|
||||||
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
|
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
import org.springframework.util.DigestUtils;
|
import org.springframework.util.DigestUtils;
|
||||||
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.UserAccountStatusEnum;
|
|
||||||
import cn.celess.blog.entity.*;
|
import cn.celess.common.enmu.UserAccountStatusEnum;
|
||||||
import cn.celess.blog.entity.model.*;
|
import cn.celess.common.entity.*;
|
||||||
|
import cn.celess.common.entity.vo.*;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
|
|
||||||
import com.dyuproject.protostuff.LinkedBuffer;
|
import com.dyuproject.protostuff.LinkedBuffer;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -1369,12 +1369,9 @@ public class RedisUtil {
|
|||||||
public <T> boolean putListCacheWithExpireTime(String key, List<T> objList, final long expireTime) {
|
public <T> boolean putListCacheWithExpireTime(String key, List<T> objList, final long expireTime) {
|
||||||
final byte[] bkey = key.getBytes();
|
final byte[] bkey = key.getBytes();
|
||||||
final byte[] bvalue = ProtoStuffSerializerUtil.serializeList(objList);
|
final byte[] bvalue = ProtoStuffSerializerUtil.serializeList(objList);
|
||||||
boolean result = redisTemplate.execute(new RedisCallback<Boolean>() {
|
boolean result = redisTemplate.execute((RedisCallback<Boolean>) connection -> {
|
||||||
@Override
|
connection.setEx(bkey, expireTime, bvalue);
|
||||||
public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
|
return true;
|
||||||
connection.setEx(bkey, expireTime, bvalue);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.util;
|
package cn.celess.common.util;
|
||||||
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="cn.celess.blog.mapper.ArticleTagMapper">
|
<mapper namespace="cn.celess.common.mapper.ArticleTagMapper">
|
||||||
|
|
||||||
<resultMap id="articleTagResultMap" type="cn.celess.blog.entity.ArticleTag">
|
<resultMap id="articleTagResultMap" type="cn.celess.common.entity.ArticleTag">
|
||||||
<id column="at_id" property="id"/>
|
<id column="at_id" property="id"/>
|
||||||
<result column="a_id" property="article.id"/>
|
<result column="a_id" property="article.id"/>
|
||||||
<result column="t_id" property="tag.id"/>
|
<result column="t_id" property="tag.id"/>
|
||||||
<association property="article" column="a_id" resultMap="cn.celess.blog.mapper.ArticleMapper.articleResultMap"
|
<association property="article" column="a_id" resultMap="cn.celess.common.mapper.ArticleMapper.articleResultMap"
|
||||||
javaType="cn.celess.blog.entity.Article">
|
javaType="cn.celess.common.entity.Article">
|
||||||
</association>
|
</association>
|
||||||
<association property="tag" column="t_id" resultMap="cn.celess.blog.mapper.CategoryMapper.categoryResultMap"
|
<association property="tag" column="t_id" resultMap="cn.celess.common.mapper.CategoryMapper.categoryResultMap"
|
||||||
javaType="cn.celess.blog.entity.TagCategory">
|
javaType="cn.celess.common.entity.TagCategory">
|
||||||
</association>
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
and article_tag.t_id = tag_category.t_id
|
and article_tag.t_id = tag_category.t_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findTagByArticleId" resultMap="cn.celess.blog.mapper.TagMapper.tagResultMap">
|
<select id="findTagByArticleId" resultMap="cn.celess.common.mapper.TagMapper.tagResultMap">
|
||||||
select tag_category.*
|
select tag_category.*
|
||||||
from article_tag,
|
from article_tag,
|
||||||
tag_category
|
tag_category
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.CategoryMapper">
|
<mapper namespace="cn.celess.common.mapper.CategoryMapper">
|
||||||
<resultMap id="categoryResultMap" type="cn.celess.blog.entity.Category">
|
<resultMap id="categoryResultMap" type="cn.celess.common.entity.Category">
|
||||||
<id column="t_id" property="id"/>
|
<id column="t_id" property="id"/>
|
||||||
<result column="t_name" property="name"/>
|
<result column="t_name" property="name"/>
|
||||||
<result column="is_category" property="category"/>
|
<result column="is_category" property="category"/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.CommentMapper">
|
<mapper namespace="cn.celess.common.mapper.CommentMapper">
|
||||||
<resultMap id="commentResultMap" type="cn.celess.blog.entity.Comment">
|
<resultMap id="commentResultMap" type="cn.celess.common.entity.Comment">
|
||||||
<id column="co_id" property="id"/>
|
<id column="co_id" property="id"/>
|
||||||
<result column="co_page_path" property="pagePath"/>
|
<result column="co_page_path" property="pagePath"/>
|
||||||
<result column="co_status" property="status"/>
|
<result column="co_status" property="status"/>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<result column="co_to_author_id" property="toUser.id"/>
|
<result column="co_to_author_id" property="toUser.id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="commentViewResultMap" type="cn.celess.blog.entity.Comment">
|
<resultMap id="commentViewResultMap" type="cn.celess.common.entity.Comment">
|
||||||
<id column="commentId" property="id"/>
|
<id column="commentId" property="id"/>
|
||||||
<result column="pagePath" property="pagePath"/>
|
<result column="pagePath" property="pagePath"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
@@ -21,13 +21,13 @@
|
|||||||
<result column="pid" property="pid"/>
|
<result column="pid" property="pid"/>
|
||||||
<result column="fromAuthorId" property="fromUser.id"/>
|
<result column="fromAuthorId" property="fromUser.id"/>
|
||||||
<result column="toAuthorId" property="toUser.id"/>
|
<result column="toAuthorId" property="toUser.id"/>
|
||||||
<association property="fromUser" column="fromAuthorId" javaType="cn.celess.blog.entity.User">
|
<association property="fromUser" column="fromAuthorId" javaType="cn.celess.common.entity.User">
|
||||||
<id column="fromAuthorId" property="id"/>
|
<id column="fromAuthorId" property="id"/>
|
||||||
<result column="fromAuthorEmail" property="email"/>
|
<result column="fromAuthorEmail" property="email"/>
|
||||||
<result column="fromAuthorDisplayName" property="displayName"/>
|
<result column="fromAuthorDisplayName" property="displayName"/>
|
||||||
<result column="fromAuthorAvatar" property="avatarImgUrl"/>
|
<result column="fromAuthorAvatar" property="avatarImgUrl"/>
|
||||||
</association>
|
</association>
|
||||||
<association property="toUser" column="toAuthorId" javaType="cn.celess.blog.entity.User">
|
<association property="toUser" column="toAuthorId" javaType="cn.celess.common.entity.User">
|
||||||
<id column="toAuthorId" property="id"/>
|
<id column="toAuthorId" property="id"/>
|
||||||
<result column="toAuthorEmail" property="email"/>
|
<result column="toAuthorEmail" property="email"/>
|
||||||
<result column="toAuthorDisplayName" property="displayName"/>
|
<result column="toAuthorDisplayName" property="displayName"/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.PartnerMapper">
|
<mapper namespace="cn.celess.common.mapper.PartnerMapper">
|
||||||
<resultMap id="partnerSiteResultMap" type="cn.celess.blog.entity.PartnerSite">
|
<resultMap id="partnerSiteResultMap" type="cn.celess.common.entity.PartnerSite">
|
||||||
<id column="l_id" property="id"/>
|
<id column="l_id" property="id"/>
|
||||||
<result column="l_name" property="name"/>
|
<result column="l_name" property="name"/>
|
||||||
<result column="l_url" property="url"/>
|
<result column="l_url" property="url"/>
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
<result column="l_notification" property="notification"/>
|
<result column="l_notification" property="notification"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insert" parameterType="cn.celess.blog.entity.PartnerSite" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insert" parameterType="cn.celess.common.entity.PartnerSite" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into links (l_name, l_is_open, l_url, l_icon_path, l_desc, l_email, l_notification, is_delete)
|
insert into links (l_name, l_is_open, l_url, l_icon_path, l_desc, l_email, l_notification, is_delete)
|
||||||
values (#{name}, #{open}, #{url}, #{iconPath}, #{desc}, #{email}, #{notification}, false)
|
values (#{name}, #{open}, #{url}, #{iconPath}, #{desc}, #{email}, #{notification}, false)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update" parameterType="cn.celess.blog.entity.PartnerSite">
|
<update id="update" parameterType="cn.celess.common.entity.PartnerSite">
|
||||||
update links
|
update links
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
<if test="open!=null">l_is_open=#{open},</if>
|
<if test="open!=null">l_is_open=#{open},</if>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.UserMapper">
|
<mapper namespace="cn.celess.common.mapper.UserMapper">
|
||||||
<resultMap id="userResultMap" type="cn.celess.blog.entity.User">
|
<resultMap id="userResultMap" type="cn.celess.common.entity.User">
|
||||||
<id column="u_id" property="id"/>
|
<id column="u_id" property="id"/>
|
||||||
<result column="u_email" property="email"/>
|
<result column="u_email" property="email"/>
|
||||||
<result column="u_pwd" property="pwd"/>
|
<result column="u_pwd" property="pwd"/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.VisitorMapper">
|
<mapper namespace="cn.celess.common.mapper.VisitorMapper">
|
||||||
<resultMap id="partnerSiteResultMap" type="cn.celess.blog.entity.Visitor">
|
<resultMap id="partnerSiteResultMap" type="cn.celess.common.entity.Visitor">
|
||||||
<id column="v_id" property="id"/>
|
<id column="v_id" property="id"/>
|
||||||
<result column="v_date" property="date"/>
|
<result column="v_date" property="date"/>
|
||||||
<result column="v_user_agent" property="ua"/>
|
<result column="v_user_agent" property="ua"/>
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.WebUpdateInfoMapper">
|
<mapper namespace="cn.celess.common.mapper.WebUpdateInfoMapper">
|
||||||
<resultMap id="webUpdateResultMap" type="cn.celess.blog.entity.WebUpdate">
|
<resultMap id="webUpdateResultMap" type="cn.celess.common.entity.WebUpdate">
|
||||||
<id column="wu_id" property="id"/>
|
<id column="wu_id" property="id"/>
|
||||||
<result column="wu_info" property="updateInfo"/>
|
<result column="wu_info" property="updateInfo"/>
|
||||||
<result column="wu_time" property="updateTime"/>
|
<result column="wu_time" property="updateTime"/>
|
||||||
<result column="is_delete" property="delete"/>
|
<result column="is_delete" property="delete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insert" parameterType="cn.celess.blog.entity.WebUpdate" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insert" parameterType="cn.celess.common.entity.WebUpdate" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into web_update(wu_info, wu_time, is_delete)
|
insert into web_update(wu_info, wu_time, is_delete)
|
||||||
values (#{updateInfo}, now(), false)
|
values (#{updateInfo}, now(), false)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.ArticleMapper">
|
<mapper namespace="cn.celess.common.mapper.ArticleMapper">
|
||||||
<resultMap id="articleResultMap" type="cn.celess.blog.entity.Article">
|
<resultMap id="articleResultMap" type="cn.celess.common.entity.Article">
|
||||||
<id column="a_id" property="id"/>
|
<id column="a_id" property="id"/>
|
||||||
<result column="a_title" property="title"/>
|
<result column="a_title" property="title"/>
|
||||||
<result column="a_summary" property="summary"/>
|
<result column="a_summary" property="summary"/>
|
||||||
@@ -16,18 +16,18 @@
|
|||||||
<result column="a_publish_date" property="publishDate"/>
|
<result column="a_publish_date" property="publishDate"/>
|
||||||
<result column="a_update_date" property="updateDate"/>
|
<result column="a_update_date" property="updateDate"/>
|
||||||
<result column="is_delete" property="deleted"/>
|
<result column="is_delete" property="deleted"/>
|
||||||
<association property="category" column="a_category_id" javaType="cn.celess.blog.entity.TagCategory"
|
<association property="category" column="a_category_id" javaType="cn.celess.common.entity.TagCategory"
|
||||||
resultMap="cn.celess.blog.mapper.CategoryMapper.categoryResultMap">
|
resultMap="cn.celess.common.mapper.CategoryMapper.categoryResultMap">
|
||||||
</association>
|
</association>
|
||||||
<collection property="tags" ofType="cn.celess.blog.entity.Tag"
|
<collection property="tags" ofType="cn.celess.common.entity.Tag"
|
||||||
select="cn.celess.blog.mapper.ArticleTagMapper.findTagByArticleId" column="a_id">
|
select="cn.celess.common.mapper.ArticleTagMapper.findTagByArticleId" column="a_id">
|
||||||
<id column="tagId" property="id"/>
|
<id column="tagId" property="id"/>
|
||||||
<result column="tagName" property="name"/>
|
<result column="tagName" property="name"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="articleViewResultMap" type="cn.celess.blog.entity.Article">
|
<resultMap id="articleViewResultMap" type="cn.celess.common.entity.Article">
|
||||||
<id column="articleId" property="id"/>
|
<id column="articleId" property="id"/>
|
||||||
<result column="title" property="title"/>
|
<result column="title" property="title"/>
|
||||||
<result column="summary" property="summary"/>
|
<result column="summary" property="summary"/>
|
||||||
@@ -41,25 +41,25 @@
|
|||||||
<result column="publishDate" property="publishDate"/>
|
<result column="publishDate" property="publishDate"/>
|
||||||
<result column="updateDate" property="updateDate"/>
|
<result column="updateDate" property="updateDate"/>
|
||||||
<result column="isDelete" property="deleted"/>
|
<result column="isDelete" property="deleted"/>
|
||||||
<association property="category" column="categoryId" javaType="cn.celess.blog.entity.Category">
|
<association property="category" column="categoryId" javaType="cn.celess.common.entity.Category">
|
||||||
<id column="categoryId" property="id"/>
|
<id column="categoryId" property="id"/>
|
||||||
<result column="categoryName" property="name"/>
|
<result column="categoryName" property="name"/>
|
||||||
</association>
|
</association>
|
||||||
<association property="user" column="authorId" javaType="cn.celess.blog.entity.User">
|
<association property="user" column="authorId" javaType="cn.celess.common.entity.User">
|
||||||
<id column="authorId" property="id"/>
|
<id column="authorId" property="id"/>
|
||||||
<result column="userEmail" property="email"/>
|
<result column="userEmail" property="email"/>
|
||||||
<result column="userAvatar" property="avatarImgUrl"/>
|
<result column="userAvatar" property="avatarImgUrl"/>
|
||||||
<result column="userDisplayName" property="displayName"/>
|
<result column="userDisplayName" property="displayName"/>
|
||||||
</association>
|
</association>
|
||||||
<collection property="tags" ofType="cn.celess.blog.entity.Tag"
|
<collection property="tags" ofType="cn.celess.common.entity.Tag"
|
||||||
select="cn.celess.blog.mapper.ArticleTagMapper.findTagByArticleId" column="{articleId=articleId}">
|
select="cn.celess.common.mapper.ArticleTagMapper.findTagByArticleId" column="{articleId=articleId}">
|
||||||
<id column="tagId" property="id"/>
|
<id column="tagId" property="id"/>
|
||||||
<result column="tagName" property="name"/>
|
<result column="tagName" property="name"/>
|
||||||
</collection>
|
</collection>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.celess.blog.entity.Article">
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.celess.common.entity.Article">
|
||||||
insert into article (a_author_id, a_category_id, a_md_content, a_is_original,
|
insert into article (a_author_id, a_category_id, a_md_content, a_is_original,
|
||||||
a_summary, a_title, a_url)
|
a_summary, a_title, a_url)
|
||||||
values (#{user.id}, #{category.id}, #{mdContent}, #{type}, #{summary}, #{title}, #{url})
|
values (#{user.id}, #{category.id}, #{mdContent}, #{type}, #{summary}, #{title}, #{url})
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
where a_id = #{id}
|
where a_id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getLastestArticle" resultMap="articleViewResultMap" resultType="cn.celess.blog.entity.Article">
|
<select id="getLastestArticle" resultMap="articleViewResultMap" resultType="cn.celess.common.entity.Article">
|
||||||
select *
|
select *
|
||||||
from articleView
|
from articleView
|
||||||
order by articleId desc
|
order by articleId desc
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="cn.celess.blog.mapper.TagMapper">
|
<mapper namespace="cn.celess.common.mapper.TagMapper">
|
||||||
|
|
||||||
<resultMap id="tagResultMap" type="cn.celess.blog.entity.Tag"
|
<resultMap id="tagResultMap" type="cn.celess.common.entity.Tag"
|
||||||
extends="cn.celess.blog.mapper.CategoryMapper.categoryResultMap">
|
extends="cn.celess.common.mapper.CategoryMapper.categoryResultMap">
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||||
114
blog-deploy/pom.xml
Normal file
114
blog-deploy/pom.xml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>blog</artifactId>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>blog-deploy</artifactId>
|
||||||
|
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>13</maven.compiler.source>
|
||||||
|
<maven.compiler.target>13</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.13.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>1.4.200</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.kstyrc</groupId>
|
||||||
|
<artifactId>embedded-redis</artifactId>
|
||||||
|
<version>0.6</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
<version>2.9.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||||
|
<version>1.9.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-common</artifactId>
|
||||||
|
<version>${blog-common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-article</artifactId>
|
||||||
|
<version>${blog-article.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-categorytag</artifactId>
|
||||||
|
<version>${blog-categorytag.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-comment</artifactId>
|
||||||
|
<version>${blog-comment.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-extension</artifactId>
|
||||||
|
<version>${blog-extension.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-partnersite</artifactId>
|
||||||
|
<version>${blog-partnersite.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-siteinfo</artifactId>
|
||||||
|
<version>${blog-siteinfo.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-user</artifactId>
|
||||||
|
<version>${blog-user.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.celess</groupId>
|
||||||
|
<artifactId>blog-visitor</artifactId>
|
||||||
|
<version>${blog-visitor.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package cn.celess.blog;
|
package cn.celess;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
@@ -9,7 +8,6 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableAsync
|
@EnableAsync
|
||||||
@MapperScan("cn.celess.blog.mapper")
|
|
||||||
public class BlogApplication {
|
public class BlogApplication {
|
||||||
public static final Logger logger = LoggerFactory.getLogger(BlogApplication.class);
|
public static final Logger logger = LoggerFactory.getLogger(BlogApplication.class);
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.configuration;
|
package cn.celess.configuration;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.configuration;
|
package cn.celess.configuration;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package cn.celess.blog.configuration;
|
package cn.celess.configuration;
|
||||||
|
|
||||||
import cn.celess.blog.configuration.filter.AuthenticationFilter;
|
import cn.celess.configuration.filter.AuthenticationFilter;
|
||||||
import cn.celess.blog.configuration.filter.MultipleSubmitFilter;
|
import cn.celess.configuration.filter.MultipleSubmitFilter;
|
||||||
import cn.celess.blog.configuration.filter.VisitorRecord;
|
import cn.celess.configuration.filter.VisitorRecord;
|
||||||
import cn.celess.blog.configuration.listener.SessionListener;
|
import cn.celess.configuration.listener.SessionListener;
|
||||||
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
|
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.configuration;
|
package cn.celess.configuration;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||||
@@ -12,8 +12,6 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : xiaohai
|
* @author : xiaohai
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.celess.blog.configuration;
|
package cn.celess.configuration;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -29,7 +29,7 @@ public class SwaggerConfig {
|
|||||||
.enable(!"prod".equals(environment))
|
.enable(!"prod".equals(environment))
|
||||||
.apiInfo(apiInfo())
|
.apiInfo(apiInfo())
|
||||||
.select()
|
.select()
|
||||||
.apis(RequestHandlerSelectors.basePackage("cn.celess.blog"))
|
.apis(RequestHandlerSelectors.basePackage("cn.celess"))
|
||||||
.paths(PathSelectors.any())
|
.paths(PathSelectors.any())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package cn.celess.blog.configuration.filter;
|
package cn.celess.configuration.filter;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.service.UserService;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.util.JwtUtil;
|
import cn.celess.common.service.UserService;
|
||||||
import cn.celess.blog.util.RedisUtil;
|
import cn.celess.common.util.RedisUtil;
|
||||||
|
import cn.celess.user.util.JwtUtil;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -45,7 +46,7 @@ public class AuthenticationFilter implements HandlerInterceptor {
|
|||||||
request.getSession().setAttribute("email", jwtUtil.getUsernameFromToken(jwtStr));
|
request.getSession().setAttribute("email", jwtUtil.getUsernameFromToken(jwtStr));
|
||||||
}
|
}
|
||||||
// 不需要鉴权的路径
|
// 不需要鉴权的路径
|
||||||
if (!USER_PREFIX.equals(rootPath.toLowerCase()) && !ADMIN_PREFIX.equals(rootPath.toLowerCase())) {
|
if (!USER_PREFIX.equalsIgnoreCase(rootPath) && !ADMIN_PREFIX.equalsIgnoreCase(rootPath)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package cn.celess.blog.configuration.filter;
|
package cn.celess.configuration.filter;
|
||||||
|
|
||||||
import cn.celess.blog.enmu.ResponseEnum;
|
import cn.celess.common.enmu.ResponseEnum;
|
||||||
import cn.celess.blog.entity.Response;
|
import cn.celess.common.entity.Response;
|
||||||
import cn.celess.blog.util.RequestUtil;
|
import cn.celess.common.util.RequestUtil;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -29,7 +29,7 @@ public class MultipleSubmitFilter implements HandlerInterceptor {
|
|||||||
response.setContentType("application/json");
|
response.setContentType("application/json");
|
||||||
response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
Response result = new Response(ResponseEnum.FAILURE.getCode(), "重复请求", null);
|
Response result = new Response(ResponseEnum.FAILURE.getCode(), "重复请求", null);
|
||||||
response.getWriter().println(result.toString());
|
response.getWriter().println(result);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.configuration.filter;
|
package cn.celess.configuration.filter;
|
||||||
|
|
||||||
import cn.celess.blog.util.RequestUtil;
|
import cn.celess.common.util.RequestUtil;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package cn.celess.blog.configuration.listener;
|
package cn.celess.configuration.listener;
|
||||||
|
|
||||||
import cn.celess.blog.util.RedisUserUtil;
|
import cn.celess.user.util.RedisUserUtil;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ spring.datasource.data=classpath:sql/data.sql
|
|||||||
|
|
||||||
################## mybatis ##################
|
################## mybatis ##################
|
||||||
mybatis.mapper-locations=classpath:mapper/*.xml
|
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||||
mybatis.type-aliases-package=cn.celess.blog.entity
|
mybatis.type-aliases-package=cn.celess.common.entity
|
||||||
|
|
||||||
|
|
||||||
pagehelper.helper-dialect=mysql
|
pagehelper.helper-dialect=mysql
|
||||||
68
blog-deploy/src/main/resources/application-prod.properties
Normal file
68
blog-deploy/src/main/resources/application-prod.properties
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
server.port=8081
|
||||||
|
# 七牛的密钥配置
|
||||||
|
qiniu.accessKey=si3O2_Q7edFtjzmyyzXkoE9G1toxcjDfULhX5zdh
|
||||||
|
qiniu.secretKey=Pnq8q2Iy1Ez8RQXQR33XmgAYlit7M8C197BZ4lCj
|
||||||
|
qiniu.bucket=xiaohai
|
||||||
|
# sitemap 存放地址
|
||||||
|
sitemap.path=
|
||||||
|
# 生成JWT时候的密钥
|
||||||
|
jwt.secret=sdjfi77;47h7uuo4l;4lgiu4;dl5684aasdasdpsidf;sdf
|
||||||
|
#mybatis.type-handlers-package=cn.celess.common.mapper.typehandler
|
||||||
|
spring.jpa.show-sql=false
|
||||||
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
|
# 上传单个文件的大小
|
||||||
|
spring.servlet.multipart.max-file-size=10MB
|
||||||
|
# 上传文件的总大小
|
||||||
|
spring.servlet.multipart.max-request-size=10MB
|
||||||
|
spring.jackson.default-property-inclusion=non_null
|
||||||
|
################# 数据库 ##################
|
||||||
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
|
# spring.datasource.url=jdbc:mysql://localhost:3306/blog?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||||
|
spring.datasource.url=jdbc:mysql://localhost:3306/blog?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||||
|
spring.datasource.username=root
|
||||||
|
spring.datasource.password=zhenghai
|
||||||
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
spring.datasource.initialization-mode=never
|
||||||
|
################## mybatis ##################
|
||||||
|
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||||
|
mybatis.type-aliases-package=cn.celess.common.entity
|
||||||
|
pagehelper.helper-dialect=mysql
|
||||||
|
pagehelper.reasonable=true
|
||||||
|
pagehelper.support-methods-arguments=true
|
||||||
|
pagehelper.params=count=countSql
|
||||||
|
#### 用于nginx的代理 获取真实ip
|
||||||
|
server.use-forward-headers=true
|
||||||
|
server.tomcat.remote-ip-header=X-Real-IP
|
||||||
|
server.tomcat.protocol-header=X-Forwarded-Proto
|
||||||
|
############### email ##############
|
||||||
|
spring.mail.host=smtp.163.com
|
||||||
|
spring.mail.username=xiaohai2271@163.com
|
||||||
|
spring.mail.password=56462271Zh
|
||||||
|
spring.mail.properties.mail.smtp.auth=true
|
||||||
|
spring.mail.properties.mail.smtp.starttls.enable=true
|
||||||
|
spring.mail.properties.mail.smtp.starttls.required=true
|
||||||
|
spring.mail.default-encoding=UTF-8
|
||||||
|
spring.mail.port=465
|
||||||
|
spring.mail.properties.mail.smtp.socketFactory.port=465
|
||||||
|
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
|
||||||
|
spring.mail.properties.mail.smtp.socketFactory.fallback=false
|
||||||
|
############### redis ##############
|
||||||
|
# REDIS (RedisProperties)
|
||||||
|
# Redis数据库索引(默认为0)
|
||||||
|
spring.redis.database=0
|
||||||
|
# Redis服务器地址
|
||||||
|
spring.redis.host=127.0.0.1
|
||||||
|
# Redis服务器连接端口
|
||||||
|
spring.redis.port=6379
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
spring.redis.password=zhenghai
|
||||||
|
# 连接池最大连接数(使用负值表示没有限制)
|
||||||
|
spring.redis.jedis.pool.max-active=-1
|
||||||
|
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
spring.redis.jedis.pool.max-wait=-1
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
spring.redis.jedis.pool.max-idle=8
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
spring.redis.jedis.pool.min-idle=0
|
||||||
|
# 连接超时时间(毫秒)
|
||||||
|
spring.redis.timeout=5000
|
||||||
@@ -8,23 +8,17 @@ qiniu.bucket=
|
|||||||
sitemap.path=
|
sitemap.path=
|
||||||
# 生成JWT时候的密钥
|
# 生成JWT时候的密钥
|
||||||
jwt.secret=sdaniod213k123123ipoeqowekqwe
|
jwt.secret=sdaniod213k123123ipoeqowekqwe
|
||||||
|
|
||||||
##spring.jpa.show-sql=false
|
##spring.jpa.show-sql=false
|
||||||
##spring.jpa.hibernate.ddl-auto=update
|
##spring.jpa.hibernate.ddl-auto=update
|
||||||
|
mybatis.type-handlers-package=cn.celess.common.mapper.typehandler
|
||||||
mybatis.type-handlers-package=cn.celess.blog.mapper.typehandler
|
logging.level.cn.celess.common.mapper=debug
|
||||||
logging.level.cn.celess.blog.mapper=debug
|
|
||||||
# 上传单个文件的大小
|
# 上传单个文件的大小
|
||||||
spring.servlet.multipart.max-file-size=10MB
|
spring.servlet.multipart.max-file-size=10MB
|
||||||
# 上传文件的总大小
|
# 上传文件的总大小
|
||||||
spring.servlet.multipart.max-request-size=10MB
|
spring.servlet.multipart.max-request-size=10MB
|
||||||
|
|
||||||
spring.jackson.default-property-inclusion=non_null
|
spring.jackson.default-property-inclusion=non_null
|
||||||
|
|
||||||
|
|
||||||
################# 数据库 ##################
|
################# 数据库 ##################
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
|
|
||||||
#h2
|
#h2
|
||||||
spring.datasource.driver-class-name=org.h2.Driver
|
spring.datasource.driver-class-name=org.h2.Driver
|
||||||
spring.datasource.url=jdbc:h2:mem:testdb;mode=mysql;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
spring.datasource.url=jdbc:h2:mem:testdb;mode=mysql;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
||||||
@@ -41,7 +35,7 @@ spring.datasource.data=classpath:sql/data.sql
|
|||||||
|
|
||||||
################## mybatis ##################
|
################## mybatis ##################
|
||||||
mybatis.mapper-locations=classpath:mapper/*.xml
|
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||||
mybatis.type-aliases-package=cn.celess.blog.entity
|
mybatis.type-aliases-package=cn.celess.common.entity
|
||||||
|
|
||||||
|
|
||||||
pagehelper.helper-dialect=mysql
|
pagehelper.helper-dialect=mysql
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user