What is Spring boot?
Spring Boot is a new framework provided by the pivotal team designed to simplify the initial setup and development of new spring applications. The framework uses a specific approach to configuration, which eliminates the need for developers to define boilerplate configurations.
Spring boot Feature
1. Create a standalone spring application
2. Embedded Tomcat, no need to deploy the war file
3. Simplify MAVEN Configuration
4. Automatically configure Spring
5. Provide production-ready features such as indicators, health checks and external configurations
6. Out-of-the-box, no code generation, and no XML configuration.
Spring Boot Feature Understanding
Provides a faster start-up experience for spring-based development
Out-of-the-box, no code generation, and no XML configuration. You can also modify the default values to meet specific requirements.
Provides some of the most common non-functional features in large projects, such as embedded servers, security, metrics, health detection, external configuration, and more.
Spring boot is not an enhancement to spring functionality, but rather a way to quickly use spring.
Development Preparation
Development environment JDK 1.8
Development tools (Eclipse)
Project management tools (Maven)
Hello World's New project
Create Maven Project (Spring-boot-hello)
the pom.xml of Hello World
<!--
Spring Boot Parent dependency, the introduction of this post-related introduction will not need to add a version configuration, Spring boot will automatically select the most appropriate version to add.
-
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>
Java.version Specify the JDK version number:
<java.version>1.8</java.version>
Add Spring-boot-starter-web Dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
the coding of Hello World
Codeing steps:
Create a new controller class
New Startup Class (App–main method)
Test code
Start from scratch learn spring Boot