Preface:

Java’s various development frameworks have evolved over the years and influenced generations of programmers, and now both programmers and architects face two challenges in using these frameworks.

  1. On the one hand, it is necessary to develop the system quickly, which requires the use of a simple development framework, whether a novice or an old hand can quickly start, quickly master page rendering, database access and other common technologies. Development frameworks are also required to integrate as many tools as possible so that they can be readily available. Finally, you want to make it easier to quickly restart code changes during development and debugging.
  2. On the other hand, when system modules increase and user usage increases, faced with such challenges, the system is split into a new architecture. Programmers and architects certainly do not want to change their own development framework, but hope to transition from a small and beautiful system to a large and strong distributed system.

Looking around the popular technology frameworks in the Java open source world, few of them are capable of doing this work at the same time. Play and ActFramework are good choices, and Nutz JFinal has a good reputation in China. However, the Spring Boot framework, which can satisfy both rapid development and distributed system architecture, is still the most popular and full-featured Spring Boot framework based on Spring technology

directory

Java EE profile

Java EE, pointing out its disadvantages, introduced the popular Spring, and also illustrated some shortcomings of Spring after so many years of development, leading to Sprin Boot, well two brief examples as examples

Need to get this free “Spring Boot 2 essence, from building a small system to building a distributed large system”, jingdong T7 architects spent a year to organize the friends, scan

Spring Boot basis

The development environment of the Spring Boot application is explained, including the installation and configuration of the Java development environment, the installation and configuration of Maven, setting up the domestic repository image, and the common Maven command. This chapter concludes with a history of Spring and the existing development teams, as well as an introduction to the two core AOP Iro technologies of the Spring framework

The MVC framework

MV technology is introduced. The first part focuses on URL mapping to Controller, parameter mapping to Controller method, parameter type transformation and parameter verification. The second half is a brief introduction to view technology in MVC Freemaker Beet! And Ja ON serialization technology. Beet! Jackson will cover this in detail in Chapter 1.

View technologies

Beeti back-end template engine, an open source technology, is a popular template engine in China. It is easy to learn, powerful in function and performance, and supports MVC separation development. Another section details the Jackson JSON serialization technique. Jackson is not only the default JSON tool in SpringMVC, but also a common JSON sequence technology used in Spring Boot distributed technology.

Database access

Sql-centric database access tool Beet! SQL, another popular Dao tool, is managed in Markdown files, with built-in features such as add, delete, change and review, lightweight ORM functionality, code generation, master/slave support, and cross-database. It is suitable for developers who prefer SQL access to databases.

Spring Data JPA

In this chapter, from easy to difficult, starting with the functions provided by Spring Data, it introduces how to complete the simple function of adding, deleting, changing and searching database, and then introduces JPA to solve the inevitable complex SQL query in the application.

Spring the Boot configuration

Spring Boot advanced features such as common Sprin Boot configuration, log configuration, application configuration reading, Sprin Boot automatic assembly technology and Sprin Boot Starter implementation.

Deploy the Spring Boot application

Applications often face multiple environments, such as development, testing, on-line, on-line, and multiple Demo environments. SpringBoot provides profiles to enable multi-environment deployment.

Unit Testing

Unit testing concepts and support for unit testing under Spring Boot, including MVC unit testing, Mock testing, and test scenarios for database applications

REST

This chapter also introduces Swagger 3.0 technology to facilitate the communication, development, and testing of REST interfaces.

MongoDB

How to use the Mongo Template to access MongoDB

Redis

This section describes how to install and use the Redis server, and how to use Redis data structures and operation commands. I then show you how SpringBoot integrates Redis and how to manipulate Redis using RedisTemplate. The second half of this chapter provides an in-depth look at the serialization mechanism provided by RedisTemplate.

Elasticsearch

Elasticsearch has full text search functionality and NoSQL functionality like MongoDB. This chapter describes how to access Elasticsearch using REST Spring Data

Cache

Spring Boot Cache, and focus on Redis as a distributed Cache implementation. On this basis, improved Redis distributed cache, through less code to achieve a technical solution with level two cache

Spring Session

Spring Session provides distributed Session management. This chapter introduces the content of Nginx as reverse proxy, as well as the implementation of Spring Session Redis and its source code analysis.

Spring the Boot and the ZooKeeper

Spring Boot application of horizontal extension technology will inevitably bring distributed coordination requirements, ZooKeeper is a widely used distributed coordinator. This chapter introduces the installation and use of ZooKeeper, mainly describes three common functions of leader selection, distributed lock and service registration, and adopts Curator to perform these three functions in the Spring Boot application.

Monitor Spring Boot applications

Spring Boot provides built-in monitoring functions, enabling users to know the health status of the server through HTTP requests, such as whether the data source is available, whether the NoSQL service is available, and the latest CONTENT accessed through HTTP. This chapter describes common monitoring functions such as threading, memory, online logs, HTTP access, and RequestMapping. It also addresses some performance failures in Spring Boot applications using the dump thread technique and memory.

SpringBoot is one of the most popular frameworks in the Spring technology system. It can be used to build enterprise application systems with complex business and develop Internet applications with high performance and high throughput. The Spring Boot framework lowers the threshold of using Spring technology architecture, simplifies the construction and development process of Spring applications, and provides automatic integration of popular third-party open source technologies.

The main technology of Spring Boot focuses on two aspects. On the one hand, it is to develop a Web application system at a high speed. It introduces the Spring Boot framework, Spring MVC view technology, database access technology in detail, and introduces advanced features such as multi-environment deployment, automatic assembly and unit testing

On the other hand, when system modules increase, performance and throughput requirements increase, how to smoothly implement the distributed architecture with Spring Boot, the latter part of the introduction includes making Spring implement RESTful architecture, Using popular technologies such as Redis, MongoDB, Zoo Keep and Elasticsearch under the Spring Boot framework, using Spring Session to achieve system horizontal expansion, using Spring Cac to improve system performance

Total directory

Need to get this “Spring Boot 2 essence, from building a small system to building a distributed large system”, jingdong T7 architect spent a year to organize the friends, scan