Learn Spring Boot: use hibernate validation to complete data back-end verification

preface The verification of background data is also an important point in development. It is used to verify the correctness of data to avoid some illegal data damaging the system or entering the database, resulting in data pollution. Since data verification may be applied to many levels, the system has strict requirements for data verification ...

Posted by jaql on Wed, 17 Nov 2021 05:11:48 -0800

Zero base spring boot day 10

brief introduction Today we mainly study data verification. When transferring parameters to a RESTful interface, we can't trust any user input, so we need to verify the data during development. For example, we often have to write to judge whether the field is empty, length limit, etc. these codes are cumbersome, lengthy and error prone. Here, ...

Posted by Shaun on Wed, 17 Nov 2021 02:34:50 -0800

springboot integration rocketmq failure record

Generally, the integration of a middleware, such as redis and elastic job, is divided into the following steps 1. Import start corresponding to springboot 2. Write the configuration file and the corresponding configuration information 3. Define the attribute class corresponding to the configuration file and load the configuration information ...

Posted by ugh82 on Wed, 17 Nov 2021 02:26:31 -0800

Spring boot 2 -- data access

Automatic configuration of data sources To access the data source, we need to import the JDBC scenario first <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jdbc</artifactId> </dependency> We found that he did not auto ...

Posted by jkurrle on Tue, 16 Nov 2021 23:21:25 -0800

Learn Spring Boot: hot deployment using devtools

preface Spring boot devtools is a module for developers. The most important function is to automatically apply code changes to the latest App. The principle is to restart the application after finding that the code has changed, but the speed is faster than restarting after manual stop. Faster does not refer to the saved manual operation tim ...

Posted by shawngoldw on Tue, 16 Nov 2021 08:35:17 -0800

spring cache Basics

Spring has defined org.springframework.cache.Cache and   org.springframework.cache.CacheManager interface to unify different caching technologies; And support the use of   JSR-107   Annotations simplify our development; Provides implementations that support multiple caches. There are two main interfaces: org.springframework. ...

Posted by goodluck4287 on Tue, 16 Nov 2021 07:10:06 -0800

7, Web component injection

7, Web component injection 1. Web native component injection (Servlet, Filter, Listener) Method 1: use @ ServletComponentScan + web3.0 annotation Add the ServletComponentScan("") annotation on the main startup class of MainApplicationContext @ServletComponentScan("day01.view") @SpringBootApplication public class MainApplication ...

Posted by samUK on Tue, 16 Nov 2021 00:23:54 -0800

Spring Boot interceptor configuration

catalogue preface Spring Boot version What is an interceptor? How to customize an interceptor? How to make it work in Spring Boot? Take a chestnut thinking According to what judgment, this interface has been requested? Where is this specific information stored? How? summary preface The last article talked about the basic conten ...

Posted by blear on Fri, 12 Nov 2021 01:08:24 -0800

Spring Boot configuration filter

catalogue preface Spring Boot version What is a filter? Implementation principle of Filter How to customize a Filter? How does Spring Boot configure a Filter? Use @ Bean injection in the configuration class [recommended] Use @ WebFilter Take a chestnut summary preface The previous article introduced how to configure interceptors ...

Posted by Gighalen on Thu, 11 Nov 2021 17:30:16 -0800

One to one relationship mapping annotation @ OneToOne application in SpringData JPA

One to one relationship mapping annotation @ OneToOne application in SpringData JPA Spring Data JPA has one-to-one, one to many, many to many and other relationship mapping. This time, we mainly study one-to-one relationship mapping. One to one relationship mapping is very common in life. For example, a college student has only one all-in-one ...

Posted by jonemo on Thu, 11 Nov 2021 14:02:25 -0800