-
+
+ + ${ar.articleName } +
+${ar.articleContent }
++ ${ar.articleTime } + 作者: + 分类:心得笔记 + 阅读(${ar.articleClick }) + 评论(124) +
+diff --git a/src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java b/src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java index 101df682bcf1823899b6ee75d10beaaf7f1c0853..2070cb18395350d93f685e386b38717d17cb27bc 100644 --- a/src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java +++ b/src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java @@ -1,19 +1,20 @@ package net.myblog.web.controller; -import java.util.Date; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - import net.myblog.entity.Article; import net.myblog.service.ArticleService; import net.myblog.utils.DateUtils; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; +import javax.servlet.http.HttpServletRequest; +import java.util.Date; +import java.util.List; + +/** + * 文章归档控制类 + */ @Controller public class ArchiveArticleController extends BaseController{ diff --git a/src/src/main/java/net/myblog/web/controller/ArticleController.java b/src/src/main/java/net/myblog/web/controller/ArticleController.java new file mode 100644 index 0000000000000000000000000000000000000000..90a0c4b982b2a3bc65ffbeee85ad09a89ccf1a45 --- /dev/null +++ b/src/src/main/java/net/myblog/web/controller/ArticleController.java @@ -0,0 +1,38 @@ +package net.myblog.web.controller; + +import net.myblog.service.ArticleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +/** + *
+ * 博客控制类 + *+ * + * @author nicky + *
+ * 修改记录 + * 修改后版本: 修改人: 修改日期: 2019年01月20日 修改内容: + *+ */ +@RequestMapping("/article") +@Controller +public class ArticleController extends BaseController{ + + @Autowired + ArticleService articleService; + + /** + * 博客详情页面 + * @return + */ + @RequestMapping(value = "/details") + public ModelAndView details() { + ModelAndView mv = this.getModelAndView(); + mv.setViewName("myblog/article/article_details"); + return mv; + } + +} diff --git a/src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp b/src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp new file mode 100644 index 0000000000000000000000000000000000000000..944e7317706f587c164ae2539b9c2eb716bcaa7e --- /dev/null +++ b/src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +String loadBlogUrl = basePath + "toblog.do?pageNo="; +%> + + + +
${ar.articleContent }
++ ${ar.articleTime } + 作者: + 分类:心得笔记 + 阅读(${ar.articleClick }) + 评论(124) +
+${ar.articleContent }