This document provides a comprehensive guide to setting up and using the ForestBlog project, a personal blog system built using SSM. It includes detailed instructions, troubleshooting tips, and contact information for support. The project is ideal for learning SSM and building personal blogs. author offers both free and paid support options.
The latest news, the blogger has opened a Bilibili account: Java Liu Ge
All other blog or forum projects developed by bloggers are here
All original projects https://liuyanzhao.com/shop.html?k=Blog https://liuyanzhao.com/shop.html?k=Forum
About the project
This blog is a personal blog system based on SSM, which is suitable for students who are new to SSM and personal blog production.
The blogger has written a graduation thesis on the project and recorded a 2-hour code explanation for everyone to learn from. If you need it, you can contact the blogger at WeChat 847064370.
The main technologies involved include Maven, Spring, SpringMVC, MyBatis, JSP, MySQL, etc.
Detailed introduction: https://liuyanzhao.com/6347.html
Preview address: http://forestblog.liuyanzhao.com
Front desk renderings
Backstage renderings
Backend address:/admin or/login
Bloggers provide paid services
Note on usage
1. Selection of development tools
Please use IntelliJ IDEA and try not to use Eclipse/MyEclipse. If the project cannot be started using the former, I can help solve it. The latter can be ignored directly (theoretically it can be started).
2. Make sure you have Maven installed
Download Maven from the official website and configure the Alibaba Cloud image. Maven's settings.xml needs to be set in IDEA or Eclipse.
3. Please install the Lombok plug-in
The @Data annotation is used multiple times in the code. Please make sure your IDE has the Lombok plug-in installed, otherwise the getter/setter method cannot be found. If your lombok is invalid, it may be that the lombok version in pom.xml is quite different from the lombok version you installed.
Both Eclipse and IDEA need to install lombok.
4. There is no folder name on the project homepage
Make sure the application context in the tomcat configuration is /, not /ForestBlog. This is the reason why your homepage has no css style, because the reference css paths are all /xxx/xxx.css
Usage steps
Any questions please contact me
If it's a simple one, I can reply you directly verbally. If it's a complicated one, I can help you remotely for a fee.
QQ: 847064370
WeChat: 847064370
Leave a message online: https://liuyanzhao.com/message.html
1. Clone project
Clone or download the project locally and unzip it. It is mainly divided into three parts: ForestBlog, uploads and forest_blog.sql
ForestBlog: The complete project source code can be imported or opened using IDEA. Remember to import the ForestBlog project inside, which is the parent directory where pom.xml is located.
uploads: The directory for uploading images, separated from the source code, can be placed in a directory on the physical disk, such as a directory on the D drive, which will be discussed later.
forest_blog.sql: database file, please create the database first and then import it by running the sql file.
2. Use IDEA to import the Maven project
Make sure you have Maven installed. When importing the project, select an existing project and the type is Maven project.
Wait for Maven to download the dependencies, or click Refresh manually. If it cannot be downloaded, please check the Maven configuration and switch networks, and try multiple times.
After the import is completed, if a red error message appears in the Java class, it is probably because the Lombok plug-in is not installed.
3. Import database
Create a new database forestblog and import the database (i.e. forestblog.sql). Note that the encoding and sorting rules of the database are utf-8 and utf-8generalci
4. Modify the database connection information in the project
Modify the db.properties file, which is easy to find in src/main/resources
There is MySQL inside, please make sure MySQL is installed and started
Pay attention to modifying the database address, table name, user name and password.
Otherwise the project cannot be started
5. Configure tomcat and uploads directories
This project is an SSM project and does not have a startup class. It needs to be run through tomcat. It's easy with either Eclipse or IDEA.
Here we mainly talk about the upload directory mapping issue:
In this project, the files are uploaded locally and are not together with the project folder. That is to say, the source code and upload directory are separated.
For example, we put the uploads directory into the root directory of drive E (it is recommended to copy my uploads folder directly to the root directory of drive D). For example, if there is a picture with the path D:/uploads/2017/10/avatar.jpg, we want to Accessing the project via http://loclahost:8080/uploads/2017/10/avatar.jpg requires the following two steps:
1. To modify the upload path in UploadFileController.java, you need to modify the rootPath to the uploads directory you specified, such as String rootPath = "D:/uploads/";
If you do not modify it, the upload will fail;
2. Set uploads mapping for tomcat.
IDEA operates as follows:
Add it in Deployment in tomcat configuration, as shown in the figure
Eclispe operates as follows:
Add in front of Server/server.xml
Add the following code in the Host tag of tomcat/conf/server.xml
If you do not modify it, the images in uploads cannot be loaded and the images in the upload directory cannot be displayed.
Download address:
Github address: https://github.com/saysky/ForestBlog
(If you can help me, click Star and Fork once)
Update record
February 25, 2021
The third major update fixes some bugs and adds new functions such as user registration and user management.
November 26, 2018
The second major update re-standardizes the code and improves comments.
October 10, 2017
First complete submission
advertise
Insert advertising: Bloggers have long-term support for setting customization, software customization, and Java problem solving
See paid services for details
Blogger paid products: https://liuyanzhao.com/shop.html