SpringBoot introduction
Overview of Spring Framework
1.1 What is Spring
Spring is an open source framework. Spring is a lightweight Java Development framework developed in 2003 by Rod Johnson in his book Expert One-on-one J2EE Development and Design. Spring was created to address the complexities of enterprise application development by enabling simple Javabeans to do things previously only EJBs could do. But Spring is not limited to server-side development; any Java application can benefit from Spring in terms of simplicity, testability, and loose coupling.
1.2 How does Spring simplify Java development
To reduce the complexity of Java development, Spring employs the following four key strategies:
Pojo-based lightweight and minimally invasive programming;
2. Loose coupling through dependency injection (DI) and interface oriented;
3. Declarative programming based on AOP and conventions;
Reduce style code through sections and templates;
Introduction to SpringBoot
2.1 What is SpringBoot
SpringBoot rapid development framework to help programmers quickly integrate third-party frameworks (similar to the previous section of the engineered NPM)
Spring Boot is the starting point for all spring-based projects. Spring Boot is designed to get your Spring applications running as fast as possible with as few configuration files as possible. The short version is that SpringBoot is not a new framework. It has a lot of frameworks configured by default, just like Maven integrates all jars and SpringBoot integrates all frameworks.
2.2 Main features of SpringBoot
1. SpringBoot Starter: It consolidates groups of commonly used dependencies into a single dependency that can be added to a project’s Maven or Gradle build at once.
2. Automatic configuration: The automatic configuration feature of SpringBoot makes use of Spring4’s support for conditional configuration to reasonably predict the beans required by the application and automatically configure them;
3. Command line interface (CLI) : SpringBoot CLI gives full play to the advantages of Groovy programming language and further simplifies the development of Spring applications combined with automatic configuration;
Actuatir: It builds a small application for all the features of the SpringBoot application. But first, let’s take a quick look at each feature and get a better feel for how they simplify the Spring programming model.
5. Simplify XML configuration; All configurations are annotated. Embedded Tomcat server
2.3 Specific benefits of SpringBoot development
SSM: Spring Spring MVC Mybatis
Looking back on our previous SSM projects, the construction process is still quite tedious, and we need to:
1. Configure web. XML and load Spring and Spring MVC
2. Configure the database connection and spring transactions
3, configuration load configuration file reading, enable annotations
.
Deploy Tomcat debugging after the configuration is complete
Using Spring Boot to develop projects requires very few configurations to set up a Web project, and the IDEA can be automatically generated, which is very cool…