About this blog about SpringBoot quickly create engineering methods, mainly introduce the Spring Initializer, Spring Initializer IntelliJ IDEA is the only integrated quickly create a model project SpringBoot
Select File-> New-> Project-> find Spring Initializer option, pay attention to things, but also because the idea docking SpringBoot official website. ok, then choose a good jdk, you can point next
Note: type here can be a maven project, it can be gradle project, maven pom generally created Project parent
Packaging is packaging way: There are two ways jar and war, SpringBoot project If you do the service, then, are generally selected jar, attention SpringBoot project integrates a Servlet container, jar is possible to run directly, do not need to change the war
after point next, selected for the jar, web be sure to choose the
developer tools : what is the deployment of JAR
template engines: template engine, did not support the default jsp, of course, we also can configure
security: permission to check security
SQL: operational aspects of database
messaging and NoSQL are message processing, aspects such as message queues of, NoSQL MongoDB is to nosql other aspects such as support, ok, the other can go to the official website to see Springboot
Point next, create Springboot project
ok, let's point pom file, just take a look at the election of the jar are automatically configured
Tell us about the project file structure
- SpringbootQuickInitializerApplication: Project Application startup class
- SpringbootQuickInitializerApplicationTests: SpringBoot of Junit test class
- static: Save all the static resources, such as css, js, images, etc.
- template: save all pages template engine, template engine such as Thymeleaf, jsp, freemark, Velocity, etc., but it is recommended Thymeleaf of SpringBoot official, jsp not supported by default, but we can configure
- application.properties: Obviously this is SpringBoot application configuration file, of course, only to modify the default configuration, attention is to modify the default, because SpringBoot default configuration has done a lot for us, such as the default access port is 8080, but to this profile we modify the default configuration
Obviously, you do not want to use the idea, you can also go directly to the official website of Spring
search, plus it necessary pom configuration jar, such as web start, etc
Configured, you can download the project to the local, and then use the IDE tool can import