Spring namespace and assembly properties using spring namespace p

Spring namespace and assembly properties using spring namespace p This comes from XML. Spring's configuration management can be configured in XML, and there is the concept of namespace in XML. In fact, it's a bit like the meaning of tags. After you give a namespace, the tags in that namespace context can be used in this XML file. To simplify c ...

Added by mc2007 on Sat, 19 Feb 2022 21:31:42 +0200

ThreadContext and ThreadLocal of shiro

problem Today, I looked at the previous project written with shiro framework and looked at the source code carefully. Suddenly, I was curious. We usually use securityutils getSubject(); Method to obtain the of the current user. This class is a self-contained class under shiro, that is, shiro has encapsulated the logged in object to the i ...

Added by robtbs on Sat, 19 Feb 2022 20:02:46 +0200

SSM foundation Spring IOC container

IOC What is IOC? IOC(Inverse of Control) is a design principle in object-oriented programming, which can be used to reduce the coupling between computer codes. Reverse the creation power of objects to the Spring framework! In java, if a class wants to use the method of another class, it must create the object of this class in this class. ...

Added by veluit06 on Sat, 19 Feb 2022 19:25:17 +0200

Spring notes and usage

@Configuration explain This is equivalent to using this class as the beans tag in Spring's XML configuration file, indicating that this is a configuration class usage Put the annotation on top of the class package com.ledao.config; import org.springframework.context.annotation.Configuration; /** * @author LeDao * @company * @create 20 ...

Added by DoctorT on Sat, 19 Feb 2022 16:39:27 +0200

ControllerAdvice analysis description

ControllerAdvice analysis description @What controller advice sees most is the same as exception handling. Like this one below @ControllerAdvice public class TestControllerAdvised { @ExceptionHandler(value = Exception.class) public String modelAndViewException(){ // Do some exception handling logic } } When reading the source code of s ...

Added by robocop on Sat, 19 Feb 2022 16:32:20 +0200

Declarative transaction

What is a transaction? Transaction is to treat a series of actions as an independent unit of work, which are either completed or ineffective. Attribute ACID of transaction: 1. Atomicity: a transaction is an atomic operation consisting of a series of actions. The atomicity of a transaction ensures that the actions are either completed or inef ...

Added by amandas on Sat, 19 Feb 2022 12:43:32 +0200

[Spring] analysis of the underlying core principles of Spring

Content index of this article: 1.Bean Underlying principles of life cycle 2.Underlying principle of dependency injection 3.Initialize underlying principles 4.Inferential construction method and underlying principle 5.AOP Underlying principle 6.Spring Transaction underlying principle However, they are only general processes. In the follow-up, ...

Added by roel_v on Sat, 19 Feb 2022 11:02:25 +0200

Spring @ transactional transaction failure scenario? How to solve it?

In project development, if multiple table operations are involved, transaction mechanism will be adopted to ensure the consistency of business data; However, many small partners may just have a brief understanding. Once they encounter transaction failure, they will have no way to start. This article summarizes the common scenarios of Spring t ...

Added by alcoholic1 on Sat, 19 Feb 2022 07:06:20 +0200

SSM - aop idea - three ways to implement aop (interface, customization, annotation)

preface In the software industry, AOP is the abbreviation of Aspect Oriented Programming, which means: Aspect Oriented Programming, a technology that realizes the unified maintenance of program functions through precompiled mode and dynamic agent during operation. AOP is the continuation of OOP, a hot spot in software development, an impor ...

Added by iceblox on Sat, 19 Feb 2022 00:49:58 +0200

Spring 5 core 2: AOP aspect oriented

1, What is AOP For aspect oriented programming, AOP can isolate all parts of business logic, so as to reduce the coupling between all parts of business logic, improve the reusability of programs, and improve the efficiency of development Generally speaking, it means adding new functions to the main functions without modifying the source co ...

Added by sirup_segar on Fri, 18 Feb 2022 23:18:49 +0200