Implementing log tracing with springboot
1, Introduction to MDC
MDC (Mapped Diagnostic Context) is a function provided by log4j, logback and log4j2 to facilitate logging under multi-threaded conditions. MDC can be regarded as a hash table bound to the current thread, and key value pairs can be added to it. The content contained in MDC can be accessed by code executed in the same thre ...
Added by alexk1781 on Wed, 19 Jan 2022 09:38:44 +0200
Spring Boot quick start Thymeleaf template engine basic use
introduce
Official website Introduction of
Thymeleaf is a modern server-side Java template engine for both web and standalone environments. Thymeleaf's main goal is to bring elegant natural templates to your development workflow — HTML that can be correctly displayed in browsers and also work as static prototypes, allowing for stronger ...
Added by jayR on Wed, 19 Jan 2022 08:37:31 +0200
Power node Spring framework learning notes - Wang He IOC control inversion
Spring framework learning notes
Note download: power node official website
Video viewing address
https://www.bilibili.com/video/BV1nz4y1d7uy
1, IOC control reversal
1.1 general
IoC (Inversion of Control) is a concept and an idea. It refers to handing over the call right of the object directly controlled by the program code to the container, and ...
Added by topflight on Wed, 19 Jan 2022 06:54:51 +0200
Spring - transaction management
Spring transaction management
Spring transactions are divided into two types: programmatic transactions and declarative transactions.
1. Programming services
Program the transaction, obtain the TransactionTemplate object, and then control the transaction submission and rollback DAO
@Component
public interface DemoDao {
@Insert("inse ...
Added by lightkeepr on Wed, 19 Jan 2022 06:51:05 +0200
Starting from "0", self-study the spring framework -- finally, no new object is needed
catalogue
1, spring environment modification
2, Bean object underlying implementation (rough)
1, spring environment modification
1. Modify the version number and delete redundant services
2. Add dependency
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
...
Added by Scutterman on Wed, 19 Jan 2022 04:23:01 +0200
Circular dependency of Spring source code
What is circular dependency?
Very simply, object A depends on object B, and object B depends on object A. For example:
//A relies on B
class A{
public B b;
}
//B relies on A
class B{
public A a;
}
If Spring is not considered, circular dependency is not a problem, because it is normal for objects to depend on each other. For example:
A ...
Added by lmg on Wed, 19 Jan 2022 00:52:16 +0200
Spring security - learning notes - concurrency control of session management: the same account is only allowed to log in on one device
scene
Take over an old project: Start with POM xml
...slightly
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
...
Added by bob2006 on Tue, 18 Jan 2022 21:23:02 +0200
SpringBoot integration task
1, Spring Boot and tasks
1.1 asynchronous tasks
In Java applications, in most cases, interactive processing is realized through synchronization; However, when dealing with interaction with third-party systems, it is easy to cause slow response. Before, most of them used multithreading to complete such tasks. In fact, in spring 3 After X, ...
Added by michaewlewis on Tue, 18 Jan 2022 19:55:10 +0200
spring Insider Version 2 IoC and AOP Principles
Written earlier, this blog is a transcript of reading Inside spring Technology. Combination
Chapter 2
2.2 Design and implementation of IoC container series: BeanFactory and ApplicationContext
IoC Container Series for 2.2.1 Spring
As an IoC container, the functional specification is designed as an excuse class, BeanFactory, which reflect ...
Added by rash on Tue, 18 Jan 2022 17:13:33 +0200
SpringBoot tutorial | configuration files in SpringBoot
4.1 writing of yml and properties
As mentioned above, there are two commonly used configuration files in spring: yml and properties. Both are named after application and are usually placed in the resources folder. yml uses indentation to reflect hierarchical management, while properties uses indentation In the form of. There is no difference b ...
Added by lordrt on Tue, 18 Jan 2022 16:43:02 +0200