Spring boot focuses on the spring platform and third-party development libraries, simplifying spring-based product development. When you start Spring application development, you won't be bothered by a variety of miscellaneous transactions. With spring Boot, the initial build of the project structure can be completed with a small amount of spring configuration in development.
Functional characteristics
- Create a standalone spring application.
- Embed Tomcat, jetty, and Undertow directly (no need to deploy war files).
- Simplify MAVEN configuration with a specific pom file.
- Automate the configuration of spring as much as possible.
- Provide product-level features such as indicator measurements, health checks, external configurations, etc.
- There is absolutely no code generation or XML configuration .
The reference manual provides a detailed description of all features, as well as a guide to using common features.
Quick Start
Spring Boot provides command-line tools to quickly prototype a spring application. You can configure it with groovy scripts, which means you don't need to be familiar with Java syntax and reduce the number of template code. You can use the command line to install the Spring Boot CLI in the documentation.
If you are a Java developer, you can use Start.spring.io to generate a basic project structure, then refer to the Quick Start sample below, or read the beginner's guide.
It is recommended that you use the spring-boot--script copy to paste into your build with the dependency management system. What if you're not familiar with these? See the chapter built with Maven and Gradle in the beginner's guide.
ZSH
1234567891011 |
<parent> <groupId>org. springframework. Boot</groupId> <artifactid>Spring-boot-starter-parent</ Artifactid> <version>1.2.7.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org. springframework. Boot</groupId> <artifactid>Spring-boot-starter-Web</ Artifactid> </dependency> </dependencies> |
Hello/samplecontroller.java
Java
123456789101112131415161718192021 |
package Hello; import org. Springframework. Boot. *;import org. Springframework. Boot. Autoconfigure. *;import org. Springframework. Stereotype. *;import org. Springframework. Web. Bind. Annotation. *;@Controller@EnableAutoConfigurationpublic class samplecontroller { @RequestMapping("/") @ResponseBody String home() { return "Hello world!" ; } public static void main (string[< Span class= "Crayon-sy" >] args) throws exception { /span> springapplication. Run(samplecontroller. Class, args); }} |
- Reference Manuals
- API Manuals
- Beginner's Guide
Official website: http://projects.spring.io/spring-boot/
Open Source Address: https://github.com/spring-projects/spring-boot
http://hao.jobbole.com/spring-boot/
Spring Boot: Simplifying the initial build and development process of spring applications (RPM)