Using IntelliJ idea 2017.2.5 x64 tool learning, just I learn to use a bit idea!!
Spring boot, a new framework provided by the pivotal team, is designed to simplify the initial set-up and development process of new spring applications. The framework is configured in a specific way so that developers no longer need to define a boilerplate configuration. In this way, Spring boot is committed to becoming a leader in the booming field of rapid application development (rapid application development).
Spring Boot Features
1. Create a standalone spring application
2. Inline container simplifies web projects without deploying a war file
3. Simplify MAVEN Configuration
4. Auto-Configure Spring
5. Provide production-ready functions, such as indicators, health checks and external configuration
6. Absolutely no code generation and no configuration required for XML
Quick Start
The main goal of this chapter is to build the Spring Boot Foundation project and implement a simple HTTP request processing, which is an example of a preliminary understanding of spring boot and experience its simple, fast-developing features.
This article uses Java 1.8.0_131, Spring Boot 1.5.8 debugging Pass.
System Requirements : Java 7 and above Spring Framework 4.1.5 and above
Generate basic project access through the Spring INITIALIZR tool: http://start.spring.io/Select Build tools Maven project, Spring boot version 1.5.8, and some engineering basics, as shown in the following illustration
Click Generate Project Download item compression package
Unzip the project package and import the IDE with the MAVEN project, taking IntelliJ idea 14 as an example: select File–>new–>project from Existing Sources in the menu ... Select the Unpacked project folder, click OK click Import Project from external model and select Maven, click Next to the end. If you have multiple versions of the JDK in your environment, notice that when you choose Java SDK, please choose more than Java version 7
If the import displays only pom.xml files, see http://www.cnblogs.com/t1508001/p/6019305.html
The above steps complete the creation of the underlying project, as shown in the figure above, the infrastructure of Spring boot consists of three files (the specific path is based on all the group variances that are filled out when the user builds the project): src/main/ Java Program entry: springboot1application src/main/resources configuration file: Application.properties src/test/ Test entrance below: springboot1applicationtests
The generated springboot1application and Springboot1applicationtests classes can be run directly to start the currently created project, because the project is currently not cooperating with any data access or Web modules. The program finishes running after spring has finished loading.
Introducing Web Modules
The current pom.xml content is as follows, introducing only two modules: Spring-boot-starter: Core modules, including automatic configuration support, logs, and Yaml spring-boot-starter-test: Test modules, including JUnit, Hamcrest, Mockito
03 |
<groupId>org.springframework.boot</groupId> |