Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
smileNicky
myblog
提交
bdef260c
M
myblog
项目概览
smileNicky
/
myblog
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
myblog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bdef260c
编写于
1月 20, 2019
作者:
S
smileNicky
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/1.0.0'
上级
cb1d8297
d891e004
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
108 addition
and
7 deletion
+108
-7
src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java
...a/net/myblog/web/controller/ArchiveArticleController.java
+7
-6
src/src/main/java/net/myblog/web/controller/ArticleController.java
...ain/java/net/myblog/web/controller/ArticleController.java
+38
-0
src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
...ain/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
+62
-0
src/src/main/webapp/WEB-INF/jsp/myblog/frame/index.jsp
src/src/main/webapp/WEB-INF/jsp/myblog/frame/index.jsp
+1
-1
未找到文件。
src/src/main/java/net/myblog/web/controller/ArchiveArticleController.java
浏览文件 @
bdef260c
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
{
...
...
src/src/main/java/net/myblog/web/controller/ArticleController.java
0 → 100644
浏览文件 @
bdef260c
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
;
/**
* <pre>
* 博客控制类
* </pre>
*
* @author nicky
* <pre>
* 修改记录
* 修改后版本: 修改人: 修改日期: 2019年01月20日 修改内容:
* </pre>
*/
@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
;
}
}
src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
0 → 100644
浏览文件 @
bdef260c
<%@ 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="
;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base
href=
"
<%=
basePath
%>
"
>
<title>
Nicky's blog
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
name=
"Keywords"
content=
""
>
<meta
name=
"Description"
content=
""
>
<meta
name=
"keywords"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<link
href=
"static/blog/css/blog.css"
rel=
"stylesheet"
>
<link
href=
'http://fonts.googleapis.com/css?family=Arizonia'
rel=
'stylesheet'
type=
'text/css'
>
<script
type=
"text/javascript"
src=
"static/js/jquery-1.8.3.js"
></script>
</head>
<body>
<%@ include
file=
"../frame/top.jsp"
%>
<div
class=
"blank"
></div>
<div
class=
"article"
>
<div
class=
"content"
>
<div
class=
"bloglist"
>
<!--article begin-->
<c:choose>
<c:when
test=
"
${
not
empty
articles
}
"
>
<c:forEach
items=
"
${
articles
}
"
var=
"ar"
varStatus=
"art"
>
<ul>
<h2>
<a
title=
"${ar.articleName }"
href=
"/"
target=
"_blank"
>
${ar.articleName }
</a></h2>
<p>
${ar.articleContent }
</p>
<p
>
<span>
${ar.articleTime }
</span>
<span>
作者:
</span>
<span>
分类:
<a
href=
"/"
target=
"_blank"
>
心得笔记
</a></span>
<span>
阅读(${ar.articleClick })
</span>
<span>
评论(124)
</span>
</p>
</ul>
</c:forEach>
</c:when>
<c:otherwise>
<li>
没有相关数据
</li>
</c:otherwise>
</c:choose>
<!--article end-->
</div>
</div>
<%@ include
file=
"../frame/navsidebar.jsp"
%>
</div>
<%@ include
file=
"../frame/footer.jsp"
%>
</body>
</html>
\ No newline at end of file
src/src/main/webapp/WEB-INF/jsp/myblog/frame/index.jsp
浏览文件 @
bdef260c
...
...
@@ -34,7 +34,7 @@ String loadBlogUrl = basePath + "toblog.do?pageNo=";
<c:forEach
items=
"
${
articles
}
"
var=
"ar"
varStatus=
"art"
>
<ul>
<h2>
<a
title=
"${ar.articleName }"
href=
"
/
"
target=
"_blank"
>
<a
title=
"${ar.articleName }"
href=
"
article/details
"
target=
"_blank"
>
${ar.articleName }
</a></h2>
<p>
${ar.articleContent }
</p>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录