Spring Boot
is a new framework provided by the Pivotal team, designed to simplify Spring
the initial setup and development of new applications. The framework uses a specific way to configure, so that developers no longer need to define boilerplate configuration. rapid application development
In this way, Boot aims to be a leader in the burgeoning field of rapid application development ( ).
Features of Spring Boot
1. Create a standalone Spring
application
2. Embed directly Tomcat
, Jetty
or Undertow
, without deploying WAR
files
3. Provide recommended base POM
files to simplify Apache Maven
configuration
Spring
4. Automatically configure the framework based on project dependencies as much as possible
5. Provide production-ready features such as metrics, health checks, and external configuration
6. Absolutely no code generation and XML
no configuration required
Advantages of Spring Boot
spring boot
It can support developers to quickly develop a restful
style of microservice architecture;
spring boot
Automation is really convenient, and it is perfect for microservices. It is very convenient to deploy and manage a single jar package. As long as the system architecture is reasonably designed, large-scale projects can also be used, and with nginx
load balancing, horizontal expansion can be easily achieved;
spring boot
The problem to be solved, thin configuration is on the one hand, and on the other hand, how to easily spring
integrate the ecosystem with other tool chains (for example Redis
, email
, elasticsearch
).
Spring Boot runtime environment
Spring Boot's latest (2017-08-18) version Spring Boot 1.5.6
of the operating environment, Spring officially recommends usingJDK1.8
Name | Servlet Version | Java Version |
---|---|---|
Tomcat 8 | 3.1 | Java 7+ |
Tomcat 7 | 3.0 | Java 6+ |
Jetty 9 | 3.1 | Java 7+ |
Jetty 8 | 3.0 | Java 6+ |
Undertow 1.1 | 3.1 | Java 7+ |
Spring Boot
Makes developing stand-alone, production-level Spring-based applications as simple as " just run
". Provides out-of-the-box settings for the Spring
platform and third-party libraries so you can get started in an orderly manner. Most Spring Boot
applications require very little Spring
configuration.
Use to Spring Boot
create Java applications, use
launch or use traditional Spring
war
deployment methods. Spring Boot
Provides a Spring
command line tool to run "scripts".
Spring Boot recommends the basic POM file
name | illustrate |
---|---|
spring-boot-starter | Core POM, including autoconfiguration support, logging library, and support for YAML configuration files. |
spring-boot-starter-amqp | AMQP is supported via spring-rabbit. |
spring-boot-starter-aop | Spring-aop and AspectJ are included to support Aspect Oriented Programming (AOP). |
spring-boot-starter-batch | Support for Spring Batch, including HSQLDB. |
spring-boot-starter-data-jpa | Includes spring-data-jpa, spring-orm and Hibernate to support JPA. |
spring-boot-starter-data-mongodb | Include spring-data-mongodb to support MongoDB. |
spring-boot-starter-data-rest | RESTful exposure of Spring Data repositories is supported via spring-data-rest-webmvc. |
spring-boot-starter-jdbc | Database access using JDBC is supported. |
spring-boot-starter-security | Contains spring-security. |
spring-boot-starter-test | Contains the dependencies required for common tests, such as JUnit, Hamcrest, Mockito and spring-test. |
spring-boot-starter-velocity | Supports the use of Velocity as a template engine. |
spring-boot-starter-web | Support Web application development, including Tomcat and spring-mvc. |
spring-boot-starter-websocket | Supports the development of WebSocket applications using Tomcat. |
spring-boot-starter-ws | Support for Spring Web Services. |
spring-boot-starter-actuator | Add production-ready features such as performance metrics and monitoring. |
spring-boot-starter-remote-shell | Add remote SSH support. |
spring-boot-starter-jetty | Use Jetty instead of the default Tomcat as the application server. |
spring-boot-starter-log4j | Add Log4j support. |
spring-boot-starter-logging | Use Spring Boot's default logging framework, Logback. |
spring-boot-starter-tomcat | Use Spring Boot's default Tomcat as the application server. |