Spring: continue to create singleton beans, expose them in advance, inject attributes and initialize beans

review In the previous article, we analyzed how to create a regular bean. We returned to the doCreateBean method in our AbstractAutowireCapableBeanFactory. Now we have generated the beanWrapper //First, it depends on whether a singleton is allowed, whether circular dependency is allowed, and whether the bean is being created //To determ ...

Posted by psr540 on Sun, 24 Oct 2021 01:14:36 -0700

Principle analysis of Spring core components

This article was not originally created by the blogger. When the blogger learned the underlying principles of Spring, he felt that this article was very profitable. He read it several times and had different experiences each time, so he wanted to record it through the blog. If there is infringement, it shall be deleted. The core of Spring ...

Posted by kippy on Sat, 23 Oct 2021 03:32:08 -0700

Spring document learning

1.IOC control reversal IOC theoretical derivation Previous methods 1. First write a UserDao interface public interface UserDao { public void getUser(); } 2. Then write Dao's implementation class public class UserDaoImpl implements UserDao { @Override public void getUser() { System.out.println("Get user data"); } } 3. ...

Posted by Madatan on Fri, 22 Oct 2021 22:52:54 -0700

Spring -- declarative transaction control

catalogue Programming transaction control related objects Three objects of programming transaction control   Declarative transaction control based on XML Implementation of declarative transaction control Configuring declarative transaction control using annotations Programming transaction control related objects Three objects of pr ...

Posted by erasam on Fri, 22 Oct 2021 18:23:52 -0700

Chapter 9 Spring Security CSRF defense

Spring Security has enabled CSRF defense by default. What is CSRF CSRF is a browser cross site forged request. Hackers can induce users to perform some unexpected behaviors, which allows attackers to partially bypass the homologous strategy. For example, after the user logs in to system A, the user can modify his mailbox, and then the browse ...

Posted by upnxwood16 on Fri, 22 Oct 2021 17:44:39 -0700

[Springboot] integrate Shiro to realize login interception, user authentication and request authorization (thymeleaf, mybatis)

Shiro address: https://shiro.apache.org/ reference resources: Crazy God says Java Springboot 1, Construction project 1.1 configuration dependency Select the Springboot project to build, and select the web and thymeleaf templates. Spring boot starter thymeleaf, spring boot starter web and spring boot starter test will be imported automati ...

Posted by fireMind on Fri, 22 Oct 2021 03:07:25 -0700

@Detailed explanation of Autowired usage

@Introduction to Autowired annotation @Autowired annotation, which can label class member variables, methods and constructors to complete automatic assembly. Use @ Autowired to eliminate set and get methods. Before using @ Autowired, we use this when configuring properties on a bean <property name="Attribute name" value=" Attribute value"/ ...

Posted by Javizy on Thu, 21 Oct 2021 16:12:21 -0700

ssm integration framework

ssm integration framework is to integrate mybatis, spring and spring MVC to obtain a complete and portable project framework, which can be developed according to this framework in future projects. Before consolidation, create a database smbms, and then add the user table. ssm integration steps: 1. First create a maven project with a blank tem ...

Posted by johnrcornell on Thu, 21 Oct 2021 07:57:34 -0700

Common spring class parsing_ Spring01

What does BeanDefinition describe BeanDefinition refers to the definition file of a Bean, which is used to describe some attributes of a Bean. For example, the description describes the class type of the Bean, whether the scope scope and lazyInit bean are lazy loaded, initMethodName indicates the party issuing the initialization of the Bean, a ...

Posted by statrat on Thu, 21 Oct 2021 07:50:46 -0700

Source code analysis of Spring transaction initialization

preface In the last article   Spring transaction usage details   Described in detail in   Spring   Let's take a look at the usage process of transactions today   Spring   How are transactions implemented, such as   Spring   What does the transaction do during initialization, spring   How transaction ...

Posted by paulsbooker on Wed, 20 Oct 2021 23:02:15 -0700