mirror of https://github.com/halo-dev/halo
🐛 修复自定义页面不显示评论条数的问题
parent
15069ceb63
commit
77eae8bddf
26
pom.xml
26
pom.xml
|
@ -146,14 +146,6 @@
|
|||
<version>${hutool-all.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- devtools热部署工具 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
<scope>true</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 又拍云 -->
|
||||
<dependency>
|
||||
<groupId>com.upyun</groupId>
|
||||
|
@ -172,18 +164,18 @@
|
|||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>nexus-aliyun</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<id>aliyun</id>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>aliyun</id>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<profiles>
|
||||
<!-- 生产环境打包配置 -->
|
||||
<profile>
|
||||
|
|
|
@ -76,8 +76,9 @@ public class FrontPageController extends BaseController {
|
|||
if(null==post){
|
||||
return this.renderNotFound();
|
||||
}
|
||||
model.addAttribute("comments", CommentUtil.getComments(comments.getContent()));
|
||||
model.addAttribute("post", post);
|
||||
model.addAttribute("comments", CommentUtil.getComments(comments.getContent()));
|
||||
model.addAttribute("commentsCount", comments.getTotalElements());
|
||||
postService.updatePostView(post);
|
||||
return this.render("page");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue