Spring boot annotation implements authentication
custom interceptor
HandlerInterceptorAdapter,HandlerInterceptor
HandlerInterceptorAdapter needs to inherit and HandlerInterceptor needs to be implementedIt can be used as logging and login verificationIt is recommended to use HandlerInterceptorAdapter because methods can be overridden on demand.
There are three main methods:
preHandle: int ...
Posted by kiltannen on Thu, 02 Sep 2021 01:07:20 -0700
Spring source code process analysis
Spring's startup class is
new ClassPathXmlApplicationContext
Start with this construction method and start debug ging After that, we will enter a very important method of Spring: refresh
public void refresh() throws BeansException, IllegalStateException {
synchronized(this.startupShutdownMonitor) {
StartupStep contex ...
Posted by porto88 on Wed, 01 Sep 2021 13:15:14 -0700
spring boot integrated redis
It is convenient to integrate common NO SQL with Springboot following the principle of "convention is greater than configuration". This example makes a simple demo with redis, using Redis's set and get commands.
Introduce dependency packages for redis.
<dependency>
<groupId>or ...
Posted by dcj1978 on Sun, 05 Jul 2020 09:08:30 -0700
spring boot integrated redis
It is convenient to integrate common NO SQL with Springboot following the principle of "convention is greater than configuration". This example makes a simple demo with redis, using Redis's set and get commands.
Introduce dependency packages for redis.
<dependency>
<groupId>or ...
Posted by neverett on Sun, 05 Jul 2020 09:08:33 -0700
javaSpring uses maven's initial build step java project
1. Modify in maven projectPom.xmlIntroduce dependencies on spring.<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com ...
Posted by jason102178 on Sun, 05 Jul 2020 07:40:05 -0700
The deepest analysis of spring boot MVC automatic configuration failure in the whole network
preface
I didn't plan to write this article, but after reading the core principles of SpringBoot, I suddenly thought of the MVC automatic failure problem encountered in the previous development. Although there are many articles and official documents on the Internet explaining the reasons, I still want to have a look at it in person. What I tho ...
Posted by pr0x on Mon, 29 Jun 2020 21:05:23 -0700
Spring Cloud Gateway uses simple configuration
Basic use of Spring Cloud Gateway
Spring Cloud Gateway is the second generation gateway framework officially launched by Spring Cloud, replacing Zuul gateway. Gateway as a traffic, plays a very important role in micro service system. The common functions of gateway include routing and forwarding, author ...
Posted by POGRAN on Mon, 29 Jun 2020 20:10:52 -0700
Getting started with RocketMQ to ground transaction message & sequential message
Next: RocketMQ entry to earth (1) novice can also understand the principle and actual combat!
1, Origin of transaction message
1. Case study
Quoting official shopping cases:
At the same time, you need to add 100 points to the downstream account to ensure that 100 yuan will be deducted from the system. Account system and points system are two in ...
Posted by cyberdwarf on Mon, 29 Jun 2020 19:54:31 -0700
Custom request header of RestTemplate in SpringBoot WEB Series
User defined request header of RestTemplate in WEB Series
The last article introduced the basic usage posture of RestTemplate, and at the end of the paper, some extended advanced usage posture were proposed. This article will focus on how to carry user-defined request header, such as setting user agent and carrying Cookie
Get carry request ...
Posted by mysterbx on Mon, 29 Jun 2020 18:51:26 -0700
@What does the Transaction annotation not work?
Take a look at the simplest example of CGLIB, and feel how AOP is achieved?
/**
* Created with vernon-test
* Description:
* User: chenyuan
* Date: 16/4/25
* Time: 9:25 am
*/
public class Target {
public String execute() {
String message = "----------test()----------";
System.out.println(message);
return message ...
Posted by stylefrog on Mon, 29 Jun 2020 03:15:21 -0700