当前位置:网站首页>01_ Getting started with the spingboot framework

01_ Getting started with the spingboot framework

2022-06-24 23:06:00 Book opens autumn maple

1. Spring Boot brief introduction

Spring Boot yes Spring A whole new framework in the family , It is used to simplify Spring Application creation and development process , It can also be said that Spring Boot Can simplify our previous adoption of SpringMVC + Spring + MyBatis The process of developing the framework .-- Simplify the development ( Primary simplified configuration ), Improve development efficiency

In the past, we used SpringMVC + Spring + MyBatis When the framework is being developed , Build and integrate the three frameworks , We need to do a lot of work , Such as configuration web.xml, To configure Spring, To configure MyBatis, And put them together and so on , and Spring Boot The framework revolutionized the development process , Completely abandoned the tedious xml The configuration process , Simplify our development process with a large number of default configurations .--- Convention over configuration , Configuration is better than code

So using Spring Boot It's very easy and fast to create based on Spring Framework applications , It makes coding simple , Configuration has become simpler , Deployment becomes easier , Monitoring becomes easier . It is because Spring Boot It reduces complexity to simplicity , Make development extremely simple and fast , So in the industry, people pay more attention to .-- Now most projects are based on springboot Development

Spring Boot Focus on the trend chart in China : baidu index icon-default.png?t=M5H6http://t.cn/ROQLquP

2. Spring Boot Characteristics of

  • Can quickly create based on Spring Applications for
  • Be able to use... Directly java main Method to start the embedded Tomcat Server running Spring Boot Program , No deployment required war Package file
  • Provide agreed starter POM To simplify the Maven To configure , Give Way Maven Configuration becomes simple
  • Automatic configuration , According to the Maven Depend on the configuration ,Spring boot Automatic configuration Spring、Spring mvc etc.
  • Provides the program health check and other functions
  • You can basically not use XML The configuration file , Use annotations to configure 、Java To configure

3. Spring Boot Four cores

(1) Automatic configuration

For many Spring Applications and common application functions ,Spring Boot It can automatically provide relevant configuration

(2) Start relying on

tell Spring Boot What functions are needed , It can introduce the required dependency Libraries

(3)Actuator

So that you can go deep into the running Spring Boot Applications , A look Spring Boot Internal information of the program

(4) Command line interface

This is a Spring Boot Optional features , Mainly aimed at Groovy Language use

Groovy It's based on JVM(Java virtual machine ) Agile development language , It is a combination of Python、Ruby and Smalltalk Many powerful features of ,Groovy The code can work with Java The code is well combined , It can also be used to extend existing code , Because it runs in JVM Characteristics of ,Groovy You can use other Java A library of languages

4. Spring Boot Development version recommendation

  • Spring boot Now it's divided into two major series ,1.x Series and 2.x series
  • If using eclipse, Recommended installation Spring Tool Suite (STS) plug-in unit
  • If you use IDEA Flagship Edition , Bring it with you Spring Boot plug-in unit
  • Recommended Maven 3.3+,Maven The latest version is 3.6.0(2019.01)
  • Recommended Java 8,Spring Boot 1.x The version of the series is compatible with Java 6,Spring Boot 2.x The series needs at least Java8
原网站

版权声明
本文为[Book opens autumn maple]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241714023718.html