Spring's task scheduling @ Scheduled annotation -- Analysis of task:scheduler and task:executor
Spring's task scheduling @ Scheduled annotation -- Analysis of task:scheduler and task:executor
applicationContext is configured as follows:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.o ...
Posted by transformationstarts on Mon, 27 Sep 2021 07:07:04 -0700
The Autowired injection Service becomes the Mapper proxy of biaomidou
Problem overview
A Springboot project uses mybatis plus as the data layer framework Scan Mapper interface with @ MapperScan annotation @MapperScan("org.net5ijy.cloud.*")
public class DemoApplication {}
Use @ Autowired to inject Service in the Controller layer
Service interface public interface LoginService {}
Service implementation c ...
Posted by tiki on Mon, 27 Sep 2021 03:40:49 -0700
Resolution of refresh invokebeanfactoryprocessor method
[continued]
5. invokeBeanFactoryPostProcessors(beanFactory);
Look, the name is calling the method of the implementation class of beanfactoryprocessor.
Question: when did you find the implementation class of beanfactoryprocessor.
AbstractApplicationContext#invokeBeanFactoryPostProcessors
/**
* Instantiate and invoke all registered BeanFact ...
Posted by Tory on Sun, 26 Sep 2021 18:07:57 -0700
Blog project summary
####Detailed notes on springboot
Details: https://www.cnblogs.com/swzx-1213/p/12781836.html
1, Using aop log management: Blog AOP details
1. Import dependency
<!--Log dependency-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
...
Posted by siesmith on Sun, 26 Sep 2021 15:21:05 -0700
cgb2107 - phase III - day04 mybatis advanced usage
1. Mybatis operation
1.1 fuzzy query
1.1.1 edit test class
/*
Mybatis Job:
Requirement: query the data containing "fine" in name, and arrange it in descending order by age
*/
@Test
public void findLike(){
SqlSession sqlSession = sqlSessionFactory.openSession(true);
DemoUserMapper dem ...
Posted by rhyspaterson on Sun, 26 Sep 2021 11:23:58 -0700
Injection method and Bean life cycle in Bean dependent on injection - spring madness
catalogue 1. set injection (key) 2. Scope of Bean 2.1,Singleton 2.2, Prototype 2.4, Session
Dependency injection (DI). Dependency: the creation of a Bean object depends on the container. The dependent resources of a Bean object Injection: refers to the resources that the Bean object depends on, which are set and assembled by the c ...
Posted by freeloader on Sun, 26 Sep 2021 00:02:04 -0700
Spring 4.0 bis: @ Configuration usage
preface: From Spring 3.0, @ Configuration is used to define the Configuration class, which can replace the xml Configuration file. The annotated class contains one or more methods annotated by @ bean. These methods will be scanned by the AnnotationConfigApplicationContext or AnnotationConfigWebApplicationContext class, and used to build the bea ...
Posted by Petrushka on Sat, 25 Sep 2021 23:27:15 -0700
The basic idea of ioc is madness
catalogue
1. Analysis and Implementation
2, IOC essence
1. Analysis and Implementation
Let's write a piece of code in our original way
First write a UserDao interface public interface UserDao {
public void getUser();
} Then write Dao's implementation class public class UserDaoImpl implements UserDao {
@Override
...
Posted by dswain on Sat, 25 Sep 2021 21:41:38 -0700
(40) spring cloud gateway integration of java Spring Cloud+Spring boot+mybatis enterprise rapid development architecture Eureka routing and forwarding
In this section, we first create a Gateway project, then implement the simplest forwarding function and integrate Eureka routing. Recommended source code of Honghu distributed Cloud Architecture
Create Gateway project Create a Maven project of Spring Boot and increase the dependency of Spring Cloud Gateway. The code is as follows.
<parent& ...
Posted by nick314 on Sat, 25 Sep 2021 18:34:28 -0700
Spring Security Series tutorial 13 -- implementing graphic verification code based on filter
preface
In the first two chapters, I took you to learn the core API of Spring Security on authentication and authorization, as well as the execution process and underlying principle of authentication and authorization. After mastering these, we not only know what it is, but also know why it is!
In the current job hunting environment, it is no ...
Posted by etsauer on Sat, 25 Sep 2021 17:11:06 -0700