spring cycle dependency problem
1. The cause of circular dependency - injected through the constructor
Let's define two interdependent bean s (injected through the constructor):
@Component
public class CircularDependencyA {
private CircularDependencyB circB;
@Autowired
public CircularDependencyA(CircularDependencyB circ ...
Posted by headbangerbuggy on Wed, 11 Mar 2020 10:49:06 +0100
Using Spring Cloud Alibaba Nacos to realize service registration and discovery
What is Nacos
Nacos is one of the important components in Spring Cloud Alibaba ecosystem, which is used to discover, configure and manage microservices. Nacos provides a set of simple and easy-to-use feature sets, which can quickly realize dynamic service discovery, service configuration, service meta ...
Posted by almora on Tue, 10 Mar 2020 06:28:13 +0100
[Spring Security + OAuth2 + JWT start to practice] 15. User registration after third-party QQ login
brief introduction
In the previous article, QQ login is completed. Generally, if the current QQ login user is not registered in our database, he should skip to the registration binding page. If we do not configure the jump page, he will jump to / signup by default
Source code analysis
Enter social authentication filter
private Authenti ...
Posted by v00d00 on Mon, 09 Mar 2020 10:07:29 +0100
SpringCloud interceptor use (Interceptors interceptor use)
The SpringCloud backend intercepts front-end requests, which are logging, using SpringAOP, which is face-to-face.
First, intercept the request address (ip), using the Handler Interceptor Adapter, which intercepts the request address, so it is appropriate to do some validation and preprocessing for the request address. For example, below, I use ...
Posted by ternto333 on Sun, 08 Mar 2020 17:31:26 +0100
Gradle guide to java
In fact, I have always been used to build projects with maven, but yesterday I downloaded the source code of spring, and others have switched to gradle, and then I will simply learn the gradle, a typical application driven learning, and learn what new content I need
The short tutorial is as follows: ...
Posted by dammitjanet on Sun, 08 Mar 2020 09:23:53 +0100
In depth understanding of the case and practice of Java virtual machine class loading and execution subsystem
9.1 overview
In the part of Class file format and execution engine, there are not too many contents directly affected by the user's program. How to store the Class file, when to load the Class, how to connect it, and how the virtual machine can execute bytecode instructions are all directly controlled by the virtual machine. The main functions ...
Posted by dlgilbert on Sat, 07 Mar 2020 11:08:29 +0100
springboot integrates thmeleaf template engine (a must for novices)
About what tymeleaf is:
1.Thymeleaf is a popular template engine, which is developed in Java language. In addition to thmeleaf, there are template engines such as Velocity and FreeMarker, with similar functions.
2.Thymeleaf can run in the environment with and without network, that is to say, it allows ...
Posted by kvnirvana on Fri, 06 Mar 2020 06:24:34 +0100
Java log introduction - commons logging
Apache Commons Logging(JCL) provides a simple log abstraction that allows developers to use specific log implementations. JCL can use other log implementations, including Log4J, Avalon LogKit(Avalon's log framework), and JDK logging(JUL). This paper mainly introduces the simple use of JCL, the software version used in this paper: Java 1.8.0, co ...
Posted by jakobdoppler on Fri, 06 Mar 2020 05:11:47 +0100
SpringBoot integrates JPA and configures multiple databases
Write before
SpringBoot is easy to create projects, and data access throws away a lot of tedious configuration. In the previous series of blogs, I've taught you how to use SpringBoot for data access. It talks about integrating JDBC, MyBatis, and JPA.In my own actual development, I am more used to usin ...
Posted by jbulaswad on Fri, 06 Mar 2020 01:59:50 +0100
The pit I stepped on when I learned Java in those years
All the way to learn Java is like stepping on a hole. Come and let's count my blood and tears over the years
Rookie stage, spend almost every day on thunder...
First: the database table field cannot use sql field, and a 500 error will be reported. For example, the order will report an error when select ing.
Second: when using int type for ...
Posted by Fergusfer on Wed, 04 Mar 2020 10:51:00 +0100