Home > 类库下载 > java类库 > body text

What is Spring boot

清浅
Release: 2019-04-02 14:51:42
Original
5692 people have browsed it

Spring Boot is an extension of the Spring framework. It eliminates the boilerplate configuration required to set up Spring applications, makes it easy and fast to configure and run applications, and also simplifies dependency management to make development more convenient

Spring Boot is a Java-based open source framework for creating microservices. Next, I will introduce to you in detail what Spring boot is in this article. It has a certain reference function and I hope it will be helpful to you.

What is Spring boot

[Recommended courses: Java Tutorial],

Introduction to Spring Boot

Spring boot is an open source framework built on the Spring framework. It provides a simpler and faster way to configure and run web applications. program, there is no need to set up the entire Spring configuration during the entire process.

Advantages of Spring Boot

(1) It provides a flexible way to configure Java beans, XML configuration and database transactions

(2 ) Everything is automatically configured, no manual configuration required

(3) Simplified dependency management

(4) Simple scalability and good compatibility

What is Spring boot

The working process of Spring Boot

Spring Boot automatically configures the application based on the dependencies we add to the project using the @EnableAutoConfiguration annotation. For example, if a MySQL database is on the classpath in the project, but we have not configured any database connection, Spring Boot will automatically configure the in-memory database. The entry point of a Spring Boot application is the class containing the @SpringBootApplication annotation and main method. Spring Boot uses the @ComponentScan annotation to automatically scan all components contained in a project.

Spring Boot Starter

Handling dependency management is a difficult task for large projects and Spring Boot can solve this by providing a set of dependencies problem, making development more convenient. All Spring Boot starters follow the same naming pattern spring-boot-starter- *, where * indicates it is a type of application. Example:

Spring Boot Starter Actuator dependency

is used to monitor and manage your application, as shown in the following code

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Copy after login

Spring Boot Starter Security dependency

is used for Spring Security, as shown in the following code

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-security</artifactId>
</dependency>
Copy after login

Spring Boot Starter Web dependency

Used For writing Rest endpoints, as shown in the following code

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-web</artifactId>
</dependency>
Copy after login

Spring Boot Starter Thyme Leaf dependencies

For creating web applications, as shown in the following code

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Copy after login

Spring Boot Starter dependencies

is used to write test cases, as shown in the following code

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-test<artifactId>
</dependency>
Copy after login

Summary: The above is the entire content of this article, I hope it will be useful to Everyone is helpful

The above is the detailed content of What is Spring boot. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!