After reading the SpringBoot growth tutorial notes and the Ali architects, I was very addicted to it. The high-definition electronic version is too fragrant

Spring has had a glorious time. It keeps pace with the times and leads the trend of Java programming for at least 10 years. Now, with the birth of Spring Boot, we no longer have to be constrained by Spring's cumbersome configuration. Spring Boot is an excellent framework for current back-end development. It is particularly prominent in today's numerous technologies.

Now that SpringBoot has entered version 2.0, what we bring to you today is the actual combat of SpringBoot after SpringBoot2.0. From entry to actual project combat with microservice SpringBoot, this note is positioned at entry, advanced, and actual combat. Therefore, we will take care of beginners who have a certain programming experience and a certain understanding of programming, as well as relatively senior developers.

This note has a total of fifteen parts, including the last two actual projects:

  1. Enter the Spring Boot world
  2. Prepare the development environment
  3. Use development tools
  4. Spring Boo basics
  5. Layered development of web applications
  6. Responsive programming
  7. Spring Boot advanced
  8. Use ORM to operate SQL database
  9. Interface architecture style-RESTul
  10. Integrated security framework to achieve security authentication and authorization
  11. Using Redis to achieve high concurrency in Spring Boot
  12. Use RabbitMQ to realize data exchange between systems
  13. Use NoSQL database to realize search engine
  14. Develop an enterprise-level general back-end system
  15. Realize an e-commerce mall similar to Jingdong

In order not to affect your reading experience, I put the free method of obtaining this note at the end of the article! ! !

Chapter 1 Entering the Spring Boot World

Meet Spring Boot

Suggestions for learning Spring Boot

Chapter 2 Preparing the Development Environment

Build the environment

  • Install Java development environment JDK
  • Configure JDK environment variables

Familiar with Maven

  • Install and configure Maven
  • Know the pom.xml file
  • How Maven works
  • Configure domestic warehouse

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 3 Using Development Tools

Install development tools IDEA and plug-ins

  • Install IDEA
  • Configure IDEA's Maven environment
  • Install Spring Assistant plugin
  • Install the plugin Lombok

Example 1: Output "Hello World" with Spring Boot

  • Build a Spring Boot project
  • Write the controller to realize the output function
  • Run the program in IDEA
  • Packaged into executable JAR package

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Develop Spring Boot application in Eclipse

  • Install Eclipse
  • Install Spring Tools 4 plugin
  • Configure Eclipse's Maven environment
  • Create Spring Boot project

Learn about Spring's official development tool STS

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

 

Essential IDEA practical skills

  • Smart prompt code
  • Auto prompt parameter
  • Implement automatic escaping
  • Custom high reuse code block
  • Set annotation information
  • Super "Alt+Enter" shortcut
  • Use global configuration
  • Automatically generate statements

Compare IDEA and Eclipse

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

 

Chapter 4 Spring Boot Basics

Learn about Spring Boot

Common annotations of Spring Boot

Use configuration files

  • Example 3: Demonstrate how to use the application.yml file
  • Example 4: Demonstrate how to use the application.properties file
  • Example 5: Configure multiple environments with application.ym and application.properties

Learn about Spring Boot's Starter

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 5 Layered Development of Web Applications

Application layered development model-MVC

Using the view circle technology Thymeleaf

  • Meet Thymeleaf
  • Basic grammar
  • Processing loop traversal
  • Process common code blocks
  • Handling paging
  • Verify and prompt error messages
  • Example 6: Write Thymeleaf view to display data

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Use the controller

  • Common notes
  • Map URL to method
  • Processing HTTP request method
  • Processing content type
  • Use of parameters in methods

Understanding the model

Example 7: Web applications that implement the MVC pattern

  • Add dependency
  • Create a solid model
  • Create controller
  • Create a view for presentation

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

verify the data

  • Know the built-in validator Hibernate-validator
  • Custom verification function
  • Example 8: Validate form data and implement custom validation of data

Chapter 6 Reactive Programming

Understanding reactive programming

Example 9: Implement Hello World with annotation development

  • Configure WebFlux dependencies
  • Write the controller

Example 10: Use annotation development to realize data addition, deletion, modification and query

  • Create entity class
  • Write the controller
  • Test API function

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Example 11: Developing WebFlux with responsiveness

  • Write Handler
  • Write router class Router

Example 12: Use the WebFlux mode to operate the MongoDB database to realize data addition, deletion, modification and query functions

  • Add dependency
  • Create entity class
  • Write interface
  • Write API to add, delete, modify and query data

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 7 Spring Boo Advanced

Aspect Oriented Programming AOP

  • Meet Spring AOP
  • Example 13: Use AOP to manage logs

Know the loC container and Servlet container

  • Know the container
  • Example 14: Manage Beans with IoC
  • Example 15: Servlet processing request

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Filters and listeners

Know the filter

  • Example 16: implement filters
  • Know the listener
  • Example 17: implement a listener

Automatic configuration

  • Custom entry class
  • Principle of automatic configuration
  • Example 18: Custom Starter

Meta annotation

  • Understanding meta annotations
  • Example 19: Custom annotation

Exception handling

  • Understanding exception handling
  • Use controller notification
  • Example 20: Custom error handling controller
  • Example 21: Custom business exception class

unit test

  • Understand unit testing
  • Spring Boot test library
  • Quickly create test units
  • Example 22: Unit test of the Controller layer
  • Example 23: Unit test of Service layer
  • Example 24: Unit test of the Reitory layer

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 8 Operating SQL Database with ORM

Know Java's database connection template JDBCTemplate

JPA-Java Persistence API

  • Meet Spring
  • Data
  • Know PA
  • Use JPA
  • Introduction to JPA annotations and attributes
  • Example 26: Use JPA to build an entity data table

Know the JPA interface

  • JPA interface JpaReitory
  • Paging sort interface PagingAndSortingReitory
  • Data manipulation interface CrudReitory
  • Paging interface Pageable and Page
  • Sort

JPA query method

Convention method name

  • JPQL
  • Native SQL
  • Specifications
  • ExampleMatcher
  • Predicate QueryDSL
  • NamedQuery

Example 27: Use JPA to develop article management module

Implement auto-fill fields

Master relational mapping development

Know MyBatis-Java data persistence layer framework

Example 31: Use MyBatis to add, delete, modify, query and paging data

Compare JPA and MyBatis

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 9 Interface Architecture Style-RESTfuI

REST-the communication method between front and back office

Design a unified RESTful style data interface

  • version control
  • Filter information
  • Determine the HTTP method
  • Determine the return status of HTTP
  • Define a unified return format

Example 32: Provide a unified API for APP, PC, and H5 web pages

  • Enumeration class that implements response
  • Realize the returned object entity
  • Package return result
  • Unified exception handling
  • Write a test controller
  • Realize data addition, deletion, modification and query controller
  • Test Data

Example 33: Use Swagger to implement interface documents

  • Get to know RestTemplate
  • Example 34: Send GET request with RestTemplate
  • Example 35: Send T request with RestTemplate
  • Send PUT and DELETE requests with RestTemplate

Use RestTemplate to initiate a request

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 10 Integrated security framework to achieve security authentication and authorization

Spring Security-Spring's security framework

Configure Spring Security

  • Inherit WebSecurityConfigure-Adapter
  • Configure custom policies
  • Configure encryption method
  • Custom encryption rules
  • Configure a multi-user system
  • Several ways to get the information of the currently logged in user

Example 36: Use Spring Security to implement background login and permission authentication functions

  • Introduce dependencies
  • Create a page with open permissions
  • Create a page that requires permission verification
  • Configure Spring Security
  • Create a login page
  • Test permissions

Access control method

  • Spring EL permission expression
  • Control URL permissions through expressions
  • Control method permissions through expressions
  • Example 37: Using JSR-250 annotations
  • Example 38: Implement RBAC permission model

Meet JWT

Example 39: Using JWT technology to add authentication and authorization protection to Spring Boot's API

Shiro-Apache General Security Framework

Example 40: Use Shiro to realize the dynamic authority function of the management background

Compare KSpring Security and Shiro

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 11 Using Redis to Achieve High Concurrency in Spring Boot

Meet Spring Cache

Meet Redis

Redis data types

Use RedisTemplate to operate 5 data types of Redis

Example 47: Use Redis and MyBatis to add, delete, modify, and query cache data

Example 48: Use Redis and JPA to cache articles and clicks

Example 49: Implement distributed Session

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 12 Use RabbitMQ to Realize Data Exchange Between Systems

Meet RabbitMQ

Basic concepts of RabbitMQ

Six working modes of RabbitMQ

Know the AmqpTemplate interface

Integrate RabbitMQ in Spring Boot

Implement 4 sending/receiving modes of RabbitMQ in Spring Boot

Example 54: Implement the message queue delay function

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 13 Using NoSQL Database to Implement Search Engine

Elasticsearch-search application server

Example 55: Use ELK to manage Spring Boot application logs

Example 56: Realize the functions of adding, deleting, modifying, and querying documents in Spring Boot

Elasticsearch query

Example 57: Implement a product search engine

Solr-search application server

Example 58: Realize data addition, deletion, modification and query in Solr

Compare Elasticsearch and Solr

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 14 Example 59: Develop an enterprise-level general back-end system

Realize the mapping relationship between entities with JPA

  • Create user entity
  • Create role entity
  • Create authority entity

Implement dynamic authorization (RBAC) function with Spring Security

  • Realize management (add, delete, modify and query) administrator role function
  • Realize management authority function
  • Realize the function of management administrator
  • Configure security class
  • Realize RBAC permission control function

Monitor Spring Boot applications

  • Integrate Actuator in Spring Boot
  • Integrate Spring Boot admin application monitoring in Spring Boot
  • Integrate Drid connection pool monitoring in Spring Boot

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Chapter 15 Example 60: Realizing an e-commerce mall similar to Jingdong

Implement Member System with Spring Security

  • Implement member entities
  • Implement member interface
  • Realize the multi-method registration function of user name, email and mobile phone
  • Realize the use of MQ to send member registration verification emails
  • Realize the multi-way login function of user name, email address and mobile phone number

Integrated membership system (Web and APP multi-terminal multi-method registration and login) + back-end system

Implement shopping system

  • Design data sheet
  • Realize product display function
  • Implement shopping cart function
  • Use Redis to realize shopping cart data persistence

Using Redis to implement a distributed spike system

  • Realize the panic buying function and solve the problem of concurrent oversold
  • Cache pages and limit current

Use RabbitMQ to realize the cancellation function of the order expired

Realize settlement and payment functions

  • Realize the function of generating orders for settlement
  • Integrated payment

Limited!  Goose Factory first released SpringBoot flagship version, covering its full-stack knowledge points

 

Free access method: one-click three consecutive this article + follow me, scan the code to get!

Guess you like

Origin blog.csdn.net/weixin_45825082/article/details/109097553