preface

When I go out for an interview, I will also ask about Spring Boot. A flowchart of the spring Boot startup is a product of the Spring project after it has reached a certain stage.

tomcat

Spring framework, Mybatis, Spring MVC, do some development, package and deploy to Tomcat online, Tomcat starts up, it receives HTTP requests, forwards them to spring MVC framework, Call Controller -› service -› DAO -› mybatis

For Java Web development, you integrate Redis, ElasticSearch, and a lot of other things, RabbitMQ, ZooKeeper, and things like that

The spring open source community abroad launched a project, Spring Boot. We directly developed it based on Spring Boot and still used spring + Spring MVC + Mybatis framework. We can simplify our previous development process to a certain extent. Do a lot of configuration, to define some beans, the process is tedious.

spring boot

Spring Boot embedded with a Tomcat to directly let us write a Java Web system to start up, directly run a main method, Spring Boot directly to the Tomcat server to run, our code to run

Automatic assembly, for example, we can introduce Mybatis. In fact, I mainly introduce a starter dependency, which can automatically complete some configurations and definitions of MyBatis to a certain extent. It does not need us to do a lot of configurations manually, which simplifies the cost of building a project to a certain extent

Introduce some JAR packages of MyBatis, and some other JAR packages that MyBatis depends on, and then write some XML configuration files, and then define some beans, write some SQL statements, write some DAO code, at this point you can use MyBatis to execute SQL statements

starter

Just by introducing a starter, it automatically introduces you to the jar packages you need, does very simple and necessary configuration, such as the database address, and does configuration, definition and generation of beans for you without you having to do much extra configuration

The generated beans are automatically injected into, say, your DAO, freeing you from some of the work of manually configuring and defining beans

Spring Boot + Spring + SPIRng MVC + Mybatis + XXX and other technologies to develop, a lot of subsequent configuration and definition of some tedious repetitive work will be removed, automatic assembly of some functions, automatically give you some things done, do not need you to do.

Key principles of Spring Boot

Spring Boot this framework, interview assault season 3, is just a literacy, source code process is unrealistic.

Spring Boot key some principles, and architecture, draw a picture, 10 minutes of small video, spring Boot context, have a basic understanding and understanding, based on the development of Spring Boot, he roughly a workflow is what it looks like! Concern public number: Kylin bug, later will update more technical programming related articles and study skills discussion.

Main, which automatically starts an embedded Tomcat

One picture at the end, the rest in your head