What is Spring Boot?

  1. SpringBoot is a framework, a new programming specification, his generation simplifies the use of the framework, the so-called simplification refers to the simplification of the Spring many frameworks required a large number of and tedious configuration files, so SpringBoot is a framework to serve the framework, the scope of service is simplified configuration files.

  2. It uses the idea of “habit over configuration” (there’s a lot of configuration in the project, plus a custom configuration built in so you don’t have to do it manually) to get your project running quickly. It’s easy to create a standalone (running JAR, embedded Servlet container), production-level project based on the Spring framework with Spring Boot, and you can use Spring Boot with little or no Spring configuration.

  3. SpringBoot is more like the scaffolding of vuE-CLI. SpringBoot has a configuration file application.yaml, which can configure the project globally, such as port number and basic request path. Vue-cli also has a vue.config.js to configure the project, springBoot has a file pam. XML to control the dependency and the version number of the dependency. Vue-cli also has a package.json file to control project dependencies, so both have similar effects for front-end and back-end projects.

Core features of Spring Boot

  1. Standalone Spring projects: Can be run independently as jar packages, through java-jar xx.jar.
  2. Embedded Servlet container: You can choose to embed Tomcat, Jetty, or Undertow.
  3. Provides starter simplification, Maven configuration: A series of starter POMs simplify maven dependency loading.
  4. Automatic Configuration of Spring: Spring Boot automatically configates beans for classes in jar packages based on the classes in the classpath, which greatly reduces the configuration we need to use.
  5. Quasi-production application monitoring: Provides monitoring of running projects based on HTTP, SSH, and Telnet.
  6. XML configuration without code generation: implemented through conditional annotations.

Advantages of Spring Boot

  1. Build projects quickly
  2. Configuration-free integration with mainstream development frameworks
  3. Projects can run independently and do not need to be used externally by the servlet container
  4. Provides runtime application monitoring
  5. Greatly improve the development and deployment efficiency
  6. Natural integration with cloud computing

Quick setup of Spring Boot

Use idea directly, click [File] –> [New] –> [Project] in the upper right corner, select [Spring Initializr] on the left, and fill in the key information to create a springBoot project

The first step:

Step 2: Select “Spring InitialZR” and fill in the basic project information, such as name, address, library, Java version, etc

Step 3: Select the dependencies that need to be downloaded to initialize

Step 4: Select [Finish] and you are ok

Infrastructure project structure

Once the project is created, you should see the following files:

  1. SRC /main/ Java program development and main program entry
  2. SRC /main/resources configuration file
  3. SRC /test/ Java test program
  4. XML springBoot configuration file

Start the project

  1. Because OF my choiceMaven, so fromMavenWarehouse now click on the dependencyThe idea of the editor[Maven] on the right, select the refresh button and wait for completion

  1. Then we select the entry function, the little triangle to the left of the code, and the project starts