File tree Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Original file line number Diff line number Diff line change 1
1
# ForestBlog
2
- 一个简单的SSM博客系统
2
+ 该项目是博主暑假粗略学完 SSM(Spring+SpringMVC+Mybatis)后,开始着手做的一个博客系统。
3
+ 主要涉及的包括 JSP,JSTL,EL表达式,MySQL,Druid连接池,Spring,SpringMVC,MyBatis 等。
4
+ 前端采用Layui框架和扒了一个[ 网站] ( http://liuyanzhao.com ) 的前台样式。
5
+ 通过Maven管理依赖。
6
+
7
+
8
+ ## 预览地址
9
+ * 前台地址:[ http://119.29.54.53:8080/ForestBlog ] ( http://119.29.54.53:8080/ForestBlog )
10
+ * 后台地址:[ http://119.29.54.53:8080/ForestBlog/login ] ( http://119.29.54.53:8080/ForestBlog/login )
11
+ 后台账号 admin 密码 123456
12
+
13
+ ## 使用注意
14
+ 1 . 修改数据库连接信息
15
+ 数据库的信息在 ` db.properties ` 文件中
16
+
17
+ 2 . 添加 Tomcat 静态资源映射
18
+ 因为该项目中的文件上传的路径是一个物理路径,如 /Users/liuyanzhao/Documents/uploads
19
+ 现在需要在 Tomcat 配置文件里添加一条记录
20
+
21
+ ```
22
+ <Context path="/uploads" docBase="/Users/liuyanzhao/Documents/uploads" reloadable="true" crossContext="true"></Context>
23
+ ```
24
+
25
+ 这样,当我们访问
26
+ ` http://localhost:8080/ForestBlog/uploads/2017/10/20171009140054148.jpg `
27
+ 或者
28
+ ` /Uploads/2017/10/20171009140054148.jpg ` 时,
29
+ 能够访问到 ` /Users/liuyanzhao/Documents/uploads ` 中的实际文件
30
+ (如果是使用 Eclipse 或者 IntelliJ IDEA,IDE 里就可以设置)
31
+
32
+ 3. 修改文件上传路径
33
+ 该文件在 ` com/liuyanzhao/blog/controller/common/UploadFileController.java `
34
+ 大概 35 行,修改
35
+ ```
36
+ String rootPath ="/www/uploads/";
37
+ ```
38
+ 注意该路径要和第 2 步的静态资源映射的路径一致。
39
+
40
+
3
41
4
- 有时间再写说明
You can’t perform that action at this time.
0 commit comments