Home > Java > javaTutorial > What is the SpringBoot framework and how to use it

What is the SpringBoot framework and how to use it

王林
Release: 2023-05-18 11:31:06
forward
1963 people have browsed it

1. What is SpringBoot?

SpringBoot is a new framework provided by the Pivotal team. It is designed to simplify the initial construction and development process of new Spring applications. The framework uses an ad hoc approach to configuration, eliminating the need for developers to define boilerplate configurations. In this way, Spring Boot strives to become a leader in the booming field of rapid application development. It is a new framework provided by the Pivotal team and is designed to simplify the initial construction and development process of new Spring applications. The framework uses an ad hoc approach to configuration, eliminating the need for developers to define boilerplate configurations. In this way, Spring Boot strives to become a leader in the booming field of rapid application development.

2. Introduction to request and response

What is the SpringBoot framework and how to use it

##Browser/client->server process;

Request server->Browser process: response.

3.

springBoothelloWorld

(1) Create a maven project and add the pom.xml file

Add parent dependency. After introducing this, there is no need to add version configuration for related introductions. Springboot will automatically select the most appropriate version to add:

<parent>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-parent</artifactid>
<version>2.3.3.RELEASE</version>
<relativepath></relativepath> <!-- lookup parent from repository -->
</parent>
Copy after login
(2) Add jar package dependency:

<dependencies>
<!-- mvc,aop的依赖包 -->
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-web</artifactid>
<!-- 由于我们在上面指定了parent,这里就不需要指定版本号 -->
</dependency>
</dependencies>
Copy after login
(3) jdk, encoding description:

<properties>
<project.build.sourceencoding>UTF-8</project.build.sourceencoding>
<project.reporting.outputencoding>UTF- 8</project.reporting.outputencoding>
<java.version>1.7</java.version>
</properties>
Copy after login

The above is the detailed content of What is the SpringBoot framework and how to use it. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template