mirror of
https://github.com/201206030/novel.git
synced 2025-06-23 23:58:30 +00:00
后台小说发布功能上线
This commit is contained in:
@ -89,6 +89,12 @@
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -2,6 +2,7 @@ package xyz.zinglizingli.books.web;
|
||||
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@ -246,6 +247,9 @@ public class BookController {
|
||||
modelMap.put("bookContent", bookContent);
|
||||
modelMap.put("indexName", indexName);
|
||||
Book basicBook = bookService.queryBaseInfo(bookId);
|
||||
if(basicBook.getCatid() < 8) {
|
||||
bookContent.setContent(StringEscapeUtils.unescapeHtml4(bookContent.getContent()));
|
||||
}
|
||||
String bookName = basicBook.getBookName();
|
||||
Integer catId = basicBook.getCatid();
|
||||
modelMap.put("bookName", bookName);
|
||||
|
@ -6,9 +6,9 @@ spring:
|
||||
# url: jdbc:mysql://148.70.59.92:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# username: xiongxiaoyang
|
||||
# password: Lzslov123!
|
||||
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
username: books
|
||||
password: books!8888
|
||||
password: books
|
||||
cache:
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
|
Reference in New Issue
Block a user