use spring Initializr in IntelliJ to quickly build a spring boot project
New---Project
You can see the Create features window as shown in the figure. Initial Service Url
the address that points to is spring's official spring INITIALIZR tool address, so the project created here is actually based on its web tool, or it can be copied to a browser to try and generate spring Boot Project Engineering Download
Next, you can see that you can edit the project information that we created, type, language language, and so on .
Next, in this step we can choose a package that can be relied on, commonly used web, template engine, database, etc.
, where I have selected Web,thymeleaf,mysql dependencies, after the creation is complete, check the Pom.xml file to see that the dependencies have been created to complete ~
next~
Here is the physical path of the project
Finish Creation Complete
The directory structure is as follows:
Report:
As shown, the Springboot has a total infrastructure of three blocks,
1.src/main/java:demoapplication, you can start the Spring boot app by running the class directly
2.src/main/resources: Configuration directory, which is used to store some configuration information of the application, such as application name, service port, database configuration, etc. Since we have applied the Web module, we have created the static directory and the templates directory, which is used to store the resources, slices, CSS, JavaScript and so on, which is used to store the template file of the Web page.
3.src/test: Unit Test Catalog, generated demoapplicationtests implemented by JUNIT4, can be directly used to run the Spring boot application test.
Springboot (i): Use spring INITIALIZR in IntelliJ to quickly build a spring boot project