Run a SpringBoot system from start to finish

Run a SpringBoot system from start to finish

There are project source codes and sql files. How to run the project on your own computer.

Sample effect website: http://www.truedei.com

Project address: https://github.com/truedei/TD-blog

A lot of stars for TrueDei bosses

One, check jdk, Maven, Mysql.

Open the DOS interface to check: "win+R" and enter "cmd"

Check whether the Jdk version is 1.8

Check if Maven is configured

Check if Mysql is 5.7

2. Pull the project source code and sql file to the local.

选择"file”->“new”->“Project from Version Control…”

Insert picture description here

Clone: ​​HTTPS: https://github.com/truedei/TD-blog.git
pulled from git hub to local

Insert picture description here

downloading:

Insert picture description here

The loaded directory is as follows:
Insert picture description here

Problems arise: (1) if the error java: package sun.misc there is no explanation: the JDK version does not.

Three, configure the local database

1. Import the sql file into the database

Under the project file "src" -> "main" -> "resources" -> "sql" right click to find the local directory of sql, create a database named jantent, and import the project's sql file into your own database ( Right-click the jantent database, run the SQL file, find the directory just now and import them separately) The
effect is as follows:
Insert picture description here

2. Configure the database under the project


Modify the configuration under "src" -> "main" -> "resources" -> "env" -> "dev" -> "application.yml" under the project file :
Insert picture description here
Problems:

(1) Encountered the following problems when running SQL files **Description: **The database version is wrong, your Mysql is not 5.7

Insert picture description here

Fourth, run the test

Run "StartApplication", enter the loopback address in the browser: 127.0.0.1 to access

If the effect is as follows, you are successful.
Insert picture description here

Problems:
(1) If there is an error Access denied for user''@'localhost' **Description: **The database is not configured successfully

Thanks again for the source code and sql file of TrueDei.

In this way, we ran a SpringBoot system from start to finish.

Guess you like

Origin blog.csdn.net/qq_51808107/article/details/113062128