Limited, Alibaba's first "springboot actual combat notes", the gap is not a little bit

It's so beautiful 2022-01-27 07:33:32 阅读数:732

limited alibaba springboot actual combat

JavaEE Only use Spring It's getting bulky , a large number of XML Files exist in the project , Cumbersome configuration , On the allocation of integrated third party framework , Low development efficiency and deployment efficiency and so on .

Spring Boot Problem solved :

  • Spring Boot Make coding simple

  • Spring Boot Make configuration simple

  • Spring Boot Make deployment simple

  • Spring Boot Make monitoring simple

  • Spring Deficiency

Spring Boot The main features :

  • Use Spring Boot Very little configuration is required , Most of the time we just use the default configuration ;

  • The project is built quickly , Can automatically integrate third-party frameworks without configuration ;

  • You can use it completely XML The configuration file , Just auto configure ( annotation ) and Java Config;

  • Embedded Servlet Containers , Reduced environmental requirements ;

  • Provide starter simplify Manen To configure ,Spring Boot A series of starter pom To simplify our Maven rely on ;

  • Monitoring of application status in operation ;

Why? SpringBoot So popular ?

There may be many reasons , Why? Spring and SpringBoot Very popular , But in my opinion , The main reasons are as follows :

  1. Significantly improve the productivity of developers

SpringBoot The powerful automatic configuration mechanism makes it possible to start using Spring The application is very simple . what's more ,SpringBoot A variety of starters are available , That's enough for many applications . You can create a project , choice Web,Spring Data JPA / Mongo etc. ,H2 / EmbeddedMongo,Spring Data REST Initiator and create your domain entities and repositories to create database supported REST API. this is it , You have a fully functional REST API. This reduces the entry barrier for novices to be familiar with how to manually configure , And it's probably done 100 many times , And tired of writing that template ,SpringBoot It's a good solution to this problem .

  1. Simplify the higher level of abstraction

Spring and SpringBoot One of my main goals is to make things easier .Spring The combination has its own powerful Web MVC frame ,Spring Security frame , But most of its other projects provide a higher level of abstraction , To make them easier to use . for example ,Spring Data JPA By providing API To execute CRUD operation , Sort , Paging without having to implement all of these operations yourself , So that JPA Very easy to use . about Kafka for ,Spring AMQP or Spring Provides a higher level of abstraction , So you can use RabbitMQ or Kafka, Instead of writing low-level boilerplate code .

  1. Micro services and cloud local friendliness

Microservice architecture is the latest hot trend , Many organizations prefer microservice Architecture , And hope to deploy it in AWS,CloudFoundry In the cloud . Usually ,SpringBoot The application is a self-contained deployment unit (FAT Jar) Built , And use its profile concept , We can deploy the same application in multiple environments , Without changing any code . besides ,SpringCloud The module also provides build Cloud Native A set of functions required by microservices .

Because the notes are comprehensive , Quite a lot of content , Here are just some screenshots of the material , If you need to get the “SpringBoot Practical notes ” You can get it at the end of your friend's article .

The first part : introduction

Content covered :(Spring Boot simplify Spring Application development + Spring Boot The basic characteristics of + Spring Boot Settings of the workspace )

The second part : Develop the first application

Content covered :( Use Spring Boot Start relying on + Automatically Spring To configure )

The third part : Custom configuration

Content covered :( Override auto configured Bean + Configure with external properties + Custom error page )

The fourth part : test

Content covered :( Integration testing + Test the application on the server + Spring Boot Test aids for )

The fifth part :Groovy And Spring Boot CLI

Content covered :( Automatic dependency and import + Get dependency + The test is based on CLI Applications for )

The sixth part : stay Spring Boot Use in Grails

Content covered :( Use GORM Persistent data + Definition GSP View + Grails 3 and Spring Boot introduction )

Part seven : thorough Actuator

Content covered :(Actuator Web Endpoint + adjustment Actuator + adopt shell Connect to running applications + Protect Actuator)

Part eight : Deploy Spring Boot Applications

Content covered :( Deploy WAR file + Database migration + Deploy to the cloud )

appendix (Spring Boot Developer tools + Spring Boot Start relying on + Configuration properties + Spring Boot rely on )

At the end

at present , Baidu in China 、 tencent 、 Ali , foreign Amazon、Facebook、Twitter、Netflix And a series of Internet leading enterprises have invested a lot in the framework and system construction , To improve performance and availability , Everyone has done a lot of fruitful work . Now everyone can pass Spring Boot Enjoy the experience of the top companies in the industry “ welfare ”, Standing on the shoulders of giants !

If you want to learn Spring Boot, So this note is something you can't miss !

This note goes in and out , A comprehensive analysis of Spring Boot Core functions and features , To help us master happiness Java Development tool —— Spring Boot, Quickly build microservices !

Although I often laugh at myself , I'm going to be a takeout specialist in ten years , But in fact, we rely on our own efforts , It can reduce the anxiety after 35 years old , After all, there are not many good architects .

Architects , It's the career goal of most of our technical people , A good architect comes from opportunities ( company )、 Personal effort ( Eat bitterly 、 Willing to study )、 talent ( I really love it ) The result of the cooperation of the three parties , practice + Opportunity + Hard work can help you become a good architect .

If you also want to be a good architect , Then maybe the above “Spring Boot Practical notes ” You need to read , Hope to be helpful to your career development .

receive “Spring Boot Practical notes ”, Just you :

forward + Focus on , Add a little assistant to the plug-in below to get complete interview notes for free !

copyright:author[It's so beautiful],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201270733276896.html