diff --git a/pom.xml b/pom.xml index 12a3fe7..84807cd 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ search 0.0.1-SNAPSHOT search - 搜索引擎 + 小说精品楼 diff --git a/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java b/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java index ffbf214..e056561 100644 --- a/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java +++ b/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java @@ -5,4 +5,5 @@ public class CacheKeyConstans { public static final String NEWST_BOOK_LIST_KEY = "newstBookListKey"; public static final String BOOK_CONTENT_KEY_PREFIX = "bookContentKeyPrefix"; public static final String EMAIL_URL_PREFIX_KEY = "emailUrlPrefixKey"; + public static final String RANDOM_NEWS_CONTENT_KEY = "randomNewsContentKey"; } diff --git a/src/main/java/xyz/zinglizingli/books/service/BookService.java b/src/main/java/xyz/zinglizingli/books/service/BookService.java index 6da60ce..fa19443 100644 --- a/src/main/java/xyz/zinglizingli/books/service/BookService.java +++ b/src/main/java/xyz/zinglizingli/books/service/BookService.java @@ -1,5 +1,6 @@ package xyz.zinglizingli.books.service; +import com.fasterxml.jackson.databind.ObjectMapper; import com.github.pagehelper.PageHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,7 +26,10 @@ import xyz.zinglizingli.search.cache.CommonCacheUtil; import xyz.zinglizingli.search.schedule.SendUrlSchedule; import xyz.zinglizingli.search.utils.RestTemplateUtil; +import java.io.IOException; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @Service public class BookService { @@ -51,7 +55,7 @@ public class BookService { public void saveBookAndIndexAndContent(Book book, List bookIndex, List bookContent) { - //一次最多只允许插入100条记录,否则影响服务器响应,如果没有插入所有更新,则更新时间设为昨天 + //一次最多只允许插入20条记录,否则影响服务器响应,如果没有插入所有更新,则更新时间设为昨天 /*if(bookIndex.size()>100){ book.setUpdateTime(new Date(book.getUpdateTime().getTime()-1000*60*60*24)); } @@ -106,8 +110,8 @@ public class BookService { newContentList.add(bookContentItem); lastIndex = bookIndexItem; } - //一次最多只允许插入100条记录,否则影响服务器响应 - if (isUpdate && i % 100 == 0 && newBookIndexList.size() > 0) { + //一次最多只允许插入20条记录,否则影响服务器响应 + if (isUpdate && i % 20 == 0 && newBookIndexList.size() > 0) { insertIndexListAndContentList(newBookIndexList, newContentList); newBookIndexList = new ArrayList<>(); newContentList = new ArrayList<>(); @@ -244,13 +248,85 @@ public class BookService { BookContentExample example = new BookContentExample(); example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(indexNum); List bookContents = bookContentMapper.selectByExample(example); - content = bookContents.size()>0?bookContents.get(0):null; + content = bookContents.size() > 0 ? bookContents.get(0) : null; + /*try { + content.setContent(chargeBookContent(content.getContent())); + } catch (IOException e) { + log.error(e.getMessage(), e); + }*/ cacheUtil.setObject(CacheKeyConstans.BOOK_CONTENT_KEY_PREFIX + "_" + bookId + "_" + indexNum, content, 60 * 60 * 24); } return content; } + private String chargeBookContent(String content) throws IOException { + StringBuilder contentBuilder = new StringBuilder(content); + int length = content.length(); + if (length > 100) { + String jsonResult = cacheUtil.get(CacheKeyConstans.RANDOM_NEWS_CONTENT_KEY); + if (jsonResult == null) { + RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); + MultiValueMap mmap = new LinkedMultiValueMap<>(); + HttpHeaders headers = new HttpHeaders(); + headers.add("Host", "channel.chinanews.com"); + headers.add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"); + HttpEntity> request = new HttpEntity<>(mmap, headers); + String body = restTemplate.postForEntity("http://channel.chinanews.com/cns/cjs/sh.shtml", request, String.class).getBody(); + Pattern pattern = Pattern.compile("specialcnsdata\\s*=\\s*\\{\"docs\":(.+)};\\s+newslist\\s*=\\s*specialcnsdata;"); + Matcher matcher = pattern.matcher(body); + if (matcher.find()) { + jsonResult = matcher.group(1); + cacheUtil.set(CacheKeyConstans.RANDOM_NEWS_CONTENT_KEY, jsonResult, 60 * 60 * 1); + } + } + + if (jsonResult.length() > 5) { + List> list = new ObjectMapper().readValue(jsonResult, List.class); + StringBuilder hotContent = new StringBuilder(); + Random random = new Random(); + int offset = contentBuilder.indexOf(",", 100); + for (Map map : list) { + if (offset >= 100) { + hotContent.append("

"); + hotContent.append(map.get("pubtime")); + hotContent.append("

"); + contentBuilder.insert(offset + 1, hotContent.toString()); + offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); + if (offset > 100) { + hotContent.delete(0, hotContent.length()); + hotContent.append("

"); + hotContent.append(map.get("title")); + hotContent.append("

"); + contentBuilder.insert(offset + 1, hotContent.toString()); + offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); + if (offset >= 100) { + hotContent.delete(0, hotContent.length()); + hotContent.append("

"); + hotContent.append(map.get("content")); + hotContent.append("

"); + contentBuilder.insert(offset + 1, hotContent.toString()); + offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); + if (offset >= 100) { + hotContent.delete(0, hotContent.length()); + hotContent.append("

"); + hotContent.append(""); + hotContent.append("

"); + contentBuilder.insert(offset + 1, hotContent.toString()); + offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); + hotContent.delete(0, hotContent.length()); + } + } + } + } + + } + + } + } + return contentBuilder.toString(); + } + public void addVisitCount(Long bookId) { bookMapper.addVisitCount(bookId); @@ -269,7 +345,7 @@ public class BookService { example.createCriteria().andBookIdEqualTo(bookId); example.setOrderByClause("index_num desc"); List bookIndices = bookIndexMapper.selectByExample(example); - if(bookIndices.size()>0) { + if (bookIndices.size() > 0) { result.add(bookIndices.get(0).getIndexNum()); result.add(bookIndices.get(bookIndices.size() - 1).getIndexNum()); } @@ -448,6 +524,17 @@ public class BookService { System.out.println("推送数据:" + reqBody); ResponseEntity stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class); System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + + try { + Thread.sleep(1000 * 3); + + //reqBody += ("http://www.zinglizingli.xyz/book/" + bookId + ".html" + "\n"); + System.out.println("推送数据:" + reqBody); + stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); + System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + } catch (InterruptedException e) { + log.error(e.getMessage(), e); + } } } @@ -457,20 +544,32 @@ public class BookService { MultiValueMap map = new LinkedMultiValueMap<>(); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.TEXT_PLAIN); - //headers.add("User-Agent","curl/7.12.1"); headers.add("Host", "data.zz.baidu.com"); - String reqBody = ""; - //目录只推送最新一条 - reqBody += ("https://www.zinglizingli.xyz/book/" + bookIndex.getBookId() + "/" + bookIndex.getIndexNum() + ".html" + "\n"); - //reqBody += ("http://www.zinglizingli.xyz/book/" + index.getBookId() + "/" + index.getIndexNum() + ".html" + "\n"); + reqBody += ("https://www.zinglizingli.xyz/book/" + + bookIndex.getBookId() + "/" + + bookIndex.getIndexNum() + ".html" + "\n"); headers.setContentLength(reqBody.length()); HttpEntity request = new HttpEntity<>(reqBody, headers); System.out.println("推送数据:" + reqBody); - ResponseEntity stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class); + ResponseEntity stringResponseEntity = restTemplate. + postForEntity("http://data.zz.baidu.com/urls?" + + "site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x" + , request, String.class); + System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + try { + Thread.sleep(1000 * 3); + //reqBody += ("http://www.zinglizingli.xyz/book/" + index.getBookId() + "/" + index.getIndexNum() + ".html" + "\n"); + System.out.println("推送数据:" + reqBody); + stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); + System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + + } catch (InterruptedException e) { + log.error(e.getMessage(), e); + } } @@ -482,18 +581,18 @@ public class BookService { example.createCriteria().andBookIdEqualTo(bookId).andIndexNumGreaterThan(indexNum); example.setOrderByClause("index_num asc"); List bookIndices = bookIndexMapper.selectByExample(example); - if(bookIndices.size()>0){ + if (bookIndices.size() > 0) { result.add(bookIndices.get(0).getIndexNum()); - }else{ + } else { result.add(indexNum); } example = new BookIndexExample(); example.createCriteria().andBookIdEqualTo(bookId).andIndexNumLessThan(indexNum); example.setOrderByClause("index_num DESC"); bookIndices = bookIndexMapper.selectByExample(example); - if(bookIndices.size()>0){ + if (bookIndices.size() > 0) { result.add(bookIndices.get(0).getIndexNum()); - }else{ + } else { result.add(indexNum); } return result; diff --git a/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java b/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java index 7ab1ced..ce5ccc6 100644 --- a/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java +++ b/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java @@ -5,14 +5,8 @@ package xyz.zinglizingli.books.util; /**** * - * Project Name:recruit-helper-util - *

随机数生成工具类,主要包括
+ * 随机数生成工具类,主要包括 * 中文姓名,性别,Email,手机号,住址 - * @ClassName: RandomValueUtil - * @date 2018年5月23日 下午2:11:12 - * - * @version 1.0 - * @since */ public class RandomValueUtil { @@ -31,10 +25,6 @@ public class RandomValueUtil { * * Project Name: recruit-helper-util *

随机生成Email - * - * @date 2018年5月23日 下午2:13:06 - * @version v1.0 - * @since * @param lMin * 最小长度 * @param lMax @@ -72,13 +62,7 @@ public class RandomValueUtil { /*** * - * Project Name: recruit-helper-util - *

随机生成手机号码 - * - * @date 2018年5月23日 下午2:14:17 - * @version v1.0 - * @since - * @return + * 随机生成手机号码 */ public static String getTelephone() { int index=getNum(0,telFirst.length-1); @@ -90,13 +74,7 @@ public class RandomValueUtil { /*** * - * Project Name: recruit-helper-util *

随机生成8位电话号码 - * - * @date 2018年5月23日 下午2:15:31 - * @version v1.0 - * @since - * @return */ public static String getLandline() { int index=getNum(0,telFirst.length-1); @@ -115,13 +93,8 @@ public class RandomValueUtil { /*** * - * Project Name: recruit-helper-util *

返回中文姓名 * - * @date 2018年5月23日 下午2:16:16 - * @version v1.0 - * @since - * @return */ public static String getChineseName() { int index = getNum(0, firstName.length() - 1); diff --git a/src/main/java/xyz/zinglizingli/books/web/BookController.java b/src/main/java/xyz/zinglizingli/books/web/BookController.java index 86168bf..60282ab 100644 --- a/src/main/java/xyz/zinglizingli/books/web/BookController.java +++ b/src/main/java/xyz/zinglizingli/books/web/BookController.java @@ -1,16 +1,24 @@ package xyz.zinglizingli.books.web; +import com.fasterxml.jackson.databind.ObjectMapper; import com.github.pagehelper.PageInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.client.RestTemplate; import xyz.zinglizingli.books.constant.CacheKeyConstans; import xyz.zinglizingli.books.po.Book; import xyz.zinglizingli.books.po.BookContent; @@ -19,15 +27,19 @@ import xyz.zinglizingli.books.po.ScreenBullet; import xyz.zinglizingli.books.service.BookService; import xyz.zinglizingli.books.vo.BookVO; import xyz.zinglizingli.search.cache.CommonCacheUtil; +import xyz.zinglizingli.search.utils.RestTemplateUtil; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.FileInputStream; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URLEncoder; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @Controller @RequestMapping("book") @@ -41,6 +53,9 @@ public class BookController { private CommonCacheUtil commonCacheUtil; + private Logger log = LoggerFactory.getLogger(BookController.class); + + @RequestMapping("index.html") public String index(ModelMap modelMap) { List hotBooks = (List) commonCacheUtil.getObject(CacheKeyConstans.HOT_BOOK_LIST_KEY); @@ -181,13 +196,15 @@ public class BookController { int minIndexNum = 0; //查询最小目录号 List integers = bookService.queryMaxAndMinIndexNum(bookId); - if(integers.size()>1){ + if (integers.size() > 1) { minIndexNum = integers.get(1); } + BookVO bookvo = new BookVO(); BeanUtils.copyProperties(book, bookvo); bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); + modelMap.put("bookId", bookId); modelMap.put("book", bookvo); modelMap.put("minIndexNum", minIndexNum); @@ -213,17 +230,17 @@ public class BookController { public String bookContent(@PathVariable("bookId") Long bookId, @PathVariable("indexNum") Integer indexNum, ModelMap modelMap) { BookContent bookContent = bookService.queryBookContent(bookId, indexNum); String indexName; - if(bookContent==null) { + if (bookContent == null) { bookContent = new BookContent(); bookContent.setId(-1l); bookContent.setBookId(bookId); bookContent.setIndexNum(indexNum); bookContent.setContent("正在手打中,请稍等片刻,内容更新后,需要重新刷新页面,才能获取最新更新"); - indexName="更新中。。。"; - }else{ + indexName = "更新中。。。"; + } else { indexName = bookService.queryIndexNameByBookIdAndIndexNum(bookId, indexNum); } - List preAndNextIndexNum = bookService.queryPreAndNextIndexNum(bookId,indexNum); + List preAndNextIndexNum = bookService.queryPreAndNextIndexNum(bookId, indexNum); modelMap.put("nextIndexNum", preAndNextIndexNum.get(0)); modelMap.put("preIndexNum", preAndNextIndexNum.get(1)); modelMap.put("bookContent", bookContent); @@ -233,6 +250,7 @@ public class BookController { return "books/book_content"; } + @RequestMapping("addVisit") @ResponseBody public String addVisit(@RequestParam("bookId") Long bookId) { @@ -323,4 +341,6 @@ public class BookController { } -} + + +} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/search/filter/SearchFilter.java b/src/main/java/xyz/zinglizingli/search/filter/SearchFilter.java index ab902f4..0a418f4 100644 --- a/src/main/java/xyz/zinglizingli/search/filter/SearchFilter.java +++ b/src/main/java/xyz/zinglizingli/search/filter/SearchFilter.java @@ -110,15 +110,6 @@ public class SearchFilter implements Filter { try { - if (requestURL.contains("http://book.zinglizingli.xyz")) { - if(requestURI.matches("/*|(/index\\.html)")){ - req.getRequestDispatcher("/book/index.html").forward(servletRequest,servletResponse); - return; - } - - filterChain.doFilter(servletRequest, servletResponse); - return; - } if (requestURL.matches("http://m.zinglizingli.xyz(/*|(/index\\.html))") || requestURI.startsWith("/static/")) { filterChain.doFilter(req, resp); diff --git a/src/main/java/xyz/zinglizingli/search/schedule/CrawlBooksSchedule.java b/src/main/java/xyz/zinglizingli/search/schedule/CrawlBooksSchedule.java index f798f80..903ce7f 100644 --- a/src/main/java/xyz/zinglizingli/search/schedule/CrawlBooksSchedule.java +++ b/src/main/java/xyz/zinglizingli/search/schedule/CrawlBooksSchedule.java @@ -361,7 +361,7 @@ public class CrawlBooksSchedule { } - @Scheduled(cron = "0 0 2 * * ?") + //@Scheduled(cron = "0 0 2 * * ?")磁盘空间不足,暂时不抓新书 //暂定2小说,只爬分类前3本书,一共3*7=21本书,爬等以后书籍多了之后,会适当缩短更新间隔 public void crawBquge11BooksAtNight() throws Exception { final String baseUrl = "https://m.biqudao.com"; diff --git a/src/main/java/xyz/zinglizingli/search/schedule/SendEmaillSchedule.java b/src/main/java/xyz/zinglizingli/search/schedule/SendEmaillSchedule.java index da0c828..f656931 100644 --- a/src/main/java/xyz/zinglizingli/search/schedule/SendEmaillSchedule.java +++ b/src/main/java/xyz/zinglizingli/search/schedule/SendEmaillSchedule.java @@ -46,7 +46,7 @@ public class SendEmaillSchedule { private Logger log = LoggerFactory.getLogger(SendEmaillSchedule.class); - @Scheduled(cron = "0 10 17 * * *") + // @Scheduled(fixedRate = 1000*60*60*24) public void sendEmaill() { System.out.println("SendEmaillSchedule。。。。。。。。。。。。。。。"); @@ -62,7 +62,7 @@ public class SendEmaillSchedule { +"
"; mailService.sendHtmlMail(email, subject, content); try { - Thread.sleep(new Random().nextInt(1000*60)+1000*60); + Thread.sleep(new Random().nextInt(1000*60*10)+1000*60); } catch (InterruptedException e) { log.error(e.getMessage(),e); } diff --git a/src/main/java/xyz/zinglizingli/search/schedule/SendUrlSchedule.java b/src/main/java/xyz/zinglizingli/search/schedule/SendUrlSchedule.java index 785eec4..14fbbd8 100644 --- a/src/main/java/xyz/zinglizingli/search/schedule/SendUrlSchedule.java +++ b/src/main/java/xyz/zinglizingli/search/schedule/SendUrlSchedule.java @@ -44,7 +44,7 @@ public class SendUrlSchedule { private Logger log = LoggerFactory.getLogger(SendUrlSchedule.class); - @Scheduled(cron = "0 0 1 * * 5") + @Scheduled(cron = "0 0 1 * * 1") public void sendAllBookToBaidu() { System.out.println("sendAllBookToBaidu。。。。。。。。。。。。。。。"); @@ -70,6 +70,11 @@ public class SendUrlSchedule { System.out.println("推送数据:" + reqBody); ResponseEntity stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class); System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + Thread.sleep(1000 * 10); + System.out.println("推送数据:" + reqBody); + stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); + System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); + reqBody = ""; Thread.sleep(1000 * 10); } diff --git a/src/main/java/xyz/zinglizingli/search/schedule/SendWeiboSchedule.java b/src/main/java/xyz/zinglizingli/search/schedule/SendWeiboSchedule.java index 585070c..43f93b4 100644 --- a/src/main/java/xyz/zinglizingli/search/schedule/SendWeiboSchedule.java +++ b/src/main/java/xyz/zinglizingli/search/schedule/SendWeiboSchedule.java @@ -446,13 +446,14 @@ public class SendWeiboSchedule { private String sendOneSiteWeibo(RestTemplate template, String bookName, String indexName, String author, String desc, String wapName, String bookNum, String href) { String baseUrl = "http://service.weibo.com/share/aj_share.php"; Map param = new HashMap<>(); - String content = bookName + "小说最新章节列表," + bookName + "小说免费在线阅读," + bookName + + /*String content = bookName + "小说最新章节列表," + bookName + "小说免费在线阅读," + bookName + "小说TXT下载,尽在" + wapName +href+ "\n"; if(indexName != null){ content+=("最新章节:"+indexName+"\n"); } content = content + "作者:"+(author.replace("作者:","")) + "\n"; - content += ("简介:"+desc.replace("简介:","")); + content += ("简介:"+desc.replace("简介:",""));*/ + String content = bookName+"最新章节,小说"+bookName+"("+author.replace("作者:","")+")手机阅读,小说"+bookName+"TXT下载 - "+href; param.put("content", content ); param.put("styleid", "1"); param.put("from", "share"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ad7782e..882d0e6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,9 +3,15 @@ server: spring: datasource: - url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8 - username: books - password: books +# url: jdbc:mysql://148.70.59.92:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false +# username: xiongxiaoyang +# password: Lzslov123! + url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false + username: xiongxiaoyang + password: Lzslov123! +# url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8 +# username: books +# password: books cache: ehcache: config: classpath:ehcache.xml @@ -13,15 +19,15 @@ spring: mode: LEGACYHTML5 #去除thymeleaf的html严格校验thymeleaf.mode=LEGACYHTML5 cache: true # 是否开启模板缓存,默认true,建议在开发时关闭缓存,不然没法看到实时页面 freemarker: - template-loader-path: classpath:/templates #设定thymeleaf文件路径 默认为src/main/resources/templatestemplate-loader-path=classpath:/templates + template-loader-path: classpath:/templates #设定freemarker文件路径 默认为src/main/resources/templatestemplate-loader-path=classpath:/templates charset: UTF-8 # 模板编码 #邮箱服务器 mail: host: smtp.163.com #邮箱账户 - username: - #你的QQ邮箱第三方授权码 - password: + username: 13560421324@163.com + #邮箱第三方授权码 + password: xiong13560421324 #编码类型 default-encoding: UTF-8 port: 465 @@ -63,4 +69,4 @@ baidu: browser: - cookie: SINAGLOBAL=5945695441587.724.1559298271897; __guid=109181959.2094437407894937900.1565875017257.2095; un=13560421324; _s_tentry=-; Apache=8157572449986.1455.1566918991846; ULV=1566918991855:7:6:1:8157572449986.1455.1566918991846:1566086532731; login_sid_t=0cc80b9f5ea5f473e83fce3054291c03; cross_origin_proto=SSL; un=13560421324; YF-Widget-G0=4aade6ec367f09ec0a5eec921227137f; WBtopGlobal_register_version=307744aa77dd5677; SSOLoginState=1566928337; wvr=6; UOR=,,www.zinglizingli.xyz; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WFRg9065OjUyD0aaGsKRxPW5JpX5KMhUgL.Fo-f1hB7SKMp1h52dJLoI0qLxK-L1KqL1-eLxKMLB.-L122LxKMLB.-L122LxK-LBo5L12qLxKnLB-qLBoBLxKMLB.BL1K2t; ALF=1599046395; SCF=AsBEGOtiUG1hPLyZCxI1FunZd9Hg9hWWkgyzcAZjG6AxOiKPAEM99ZxY8qofeWw3xoU_Wh3OqNzt4BSkCAyD_8o.; SUB=_2A25waj8tDeRhGeNL41YR9SnNwzyIHXVTHhflrDV8PUNbmtANLXXAkW9NSM603mvU3tqplLCrqvedw1Q29U_TkxRA; SUHB=0xnyhR4nBtqt14; monitor_count=2; webim_unReadCount=%7B%22time%22%3A1567510495487%2C%22dm_pub_total%22%3A2%2C%22chat_group_client%22%3A0%2C%22allcountNum%22%3A36%2C%22msgbox%22%3A0%7D \ No newline at end of file + cookie: SINAGLOBAL=5945695441587.724.1559298271897; __guid=109181959.2094437407894937900.1565875017257.2095; un=13560421324; _s_tentry=login.sina.com.cn; Apache=967339021599.2916.1567743040489; ULV=1567743040504:8:1:1:967339021599.2916.1567743040489:1566918991855; login_sid_t=d172b083637b1186ebcd624a1259a05f; cross_origin_proto=SSL; appkey=; SSOLoginState=1567744755; YF-Widget-G0=4a4609df0e4ef6187a7b4717d4e6cf12; wvr=6; WBtopGlobal_register_version=307744aa77dd5677; un=13560421324; SCF=AsBEGOtiUG1hPLyZCxI1FunZd9Hg9hWWkgyzcAZjG6AxlhR9sKuWXBhvg1TG9iDWygqPlKun5aazN3Jc6Rky8lQ.; SUB=_2A25wfnGoDeRhGeNL41YR9SnNwzyIHXVTCuRgrDV8PUJbmtANLRWgkW9NSM603g9LJN13ACge6_UUjKxvhLP4TXZi; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WFRg9065OjUyD0aaGsKRxPW5JpX5K-hUgL.Fo-f1hB7SKMp1h52dJLoI0qLxK-L1KqL1-eLxKMLB.-L122LxKMLB.-L122LxK-LBo5L12qLxKnLB-qLBoBLxKMLB.BL1K2t; SUHB=0XDVz5Bh1mkWFA; ALF=1599812938; UOR=,,sf.zinglizingli.xyz; monitor_count=13; webim_unReadCount=%7B%22time%22%3A1568285775036%2C%22dm_pub_total%22%3A1%2C%22chat_group_client%22%3A0%2C%22allcountNum%22%3A29%2C%22msgbox%22%3A0%7D \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/BookMapper.xml b/src/main/resources/mybatis/mapping/BookMapper.xml index b979dcf..9b39724 100644 --- a/src/main/resources/mybatis/mapping/BookMapper.xml +++ b/src/main/resources/mybatis/mapping/BookMapper.xml @@ -354,7 +354,8 @@