Spring Boot series (1) Spring Boot introduction and basic POM file

Spring Bootis a new framework provided by the Pivotal team, designed to simplify Springthe 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 developmentIn this way, Boot aims to be a leader in the burgeoning field of rapid application development ( ).

 

Features of Spring Boot

1. Create a standalone Springapplication

2. Embed directly Tomcat, Jettyor Undertow, without deploying WARfiles

3. Provide recommended base POMfiles to simplify Apache Mavenconfiguration

Spring4. 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 XMLno configuration required

 

Advantages of Spring Boot

spring bootIt can support developers to quickly develop a restfulstyle of microservice architecture;

spring bootAutomation 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 nginxload balancing, horizontal expansion can be easily achieved;

spring bootThe problem to be solved, thin configuration is on the one hand, and on the other hand, how to easily springintegrate 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.6of 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 BootMakes developing stand-alone, production-level Spring-based applications as simple as " just run". Provides out-of-the-box settings for the Springplatform and third-party libraries so you can get started in an orderly manner. Most Spring Bootapplications require very little Springconfiguration.

 

Use to Spring Bootcreate Java applications, use Springlaunch or use traditional wardeployment methods. Spring BootProvides a Springcommand 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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325196644&siteId=291194637