First springboot project is based on maven, there must be maven environment.
This tutorial springboot to import a project as an example.
A springboot project a sql file.
I environment :
eclipse4.5
jdk1.8
mysql5.7
maven3.2 (Maven limited edition, can be used)
Navicat database link tool.
The following is a reference installation package or later:
link: https://pan.baidu.com/s/1X-VHvB1FrIB5kYySjEd0Ng
extraction code: 0t2v
The tutorial steps:
(1) Configuration Environment maven
(2) introduced into the item
(3) Configuration Environment
(4) Link configuration database
(5) to start the project
A configuration maven environment
Download the official website: http://maven.apache.org/download.cgi
windows version:
After downloading extract it to your disk
Select the path just unpacked:
Remember check:
The final step: Select setting.xml
Two import springboot project
Right-click on the left margin, import
Select Import maven
Select the project location, project location is the best address in English, Chinese do not appear in the path address
Once complete, you need to download jar, take some time, according to speed download jar. May take more than 10 minutes it is also possible, and then wait for the download to complete.
(3) configuration environment
A program error may occur after downloading the above, may not match with their jdk environment.
Select the right projects, build path -> configire build Path
Here choose their own jdk, if a red X, remove appears, re-add jdk.
Re-add:
Here select jdk, if you have not previously configured, there should be a default jre
This time we want to add jdk.
The Add your jdk installation address, and the hook. After determining, selecting jdk
Finally, select the project right choice maven update project .jdk might become jre can
(4) modify the database configuration
in general springboot has a profile, link to your database. Depending on your configuration information database, your database name, password and other
import sql file.
Open navcat database link tool, right click and choose New Database (random name and the name of the same to the above configuration)
Right select Run sql file, locate the file location choose OK.
After running over, right click the database name, you can refresh end database configuration.
(5) to start the project
springboot project is built with integrated tomcat, no additional run tomcat
Run the following main method to start the project
Right-class appearance of the space below run as running the project
after launch access address: localhost: 8080 / mall
You can modify the port