当前位置:网站首页>Beanpostprocessor and beanfactorypostprocessor
Beanpostprocessor and beanfactorypostprocessor
2022-06-29 07:21:00 【wending-Y】
BeanFactoryPostProcessor
For all read bean Can be modified , I've got all of them before Bean Definition , Whether it's xml Or comments
@Component
public class BeanFactoryPostProcessorImp implements BeanFactoryPostProcessor {
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
System.out.println("factory");
System.out.println(beanFactory.getBeanDefinition("simple").getBeanClassName());
}
}
BeanPostProcessor
initializeBean In this method, the post processor is executed
stay bean Before initialization , It can be processed after initialization
@Component
public class BeanPostProcessorImp implements BeanPostProcessor {
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
System.out.println(" Before initialization ");
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
System.out.println(" After the initialization ");
return bean;
}
}
Conclusion
BeanFactoryPostProcessor Order first
BeanPostProcessor Order after
边栏推荐
- jmeter 用beanshell导入自己jar包老是查找不到
- Save token get token refresh token send header header
- uva11825
- Redis (V) of NoSQL database: redis_ Jedis_ test
- NoSQL数据库之Redis(一):安装 & 简介
- NoSQL数据库介绍
- Multimodal learning pooling with context gating for video classification
- Comment choisir les fournisseurs de marques CRM dans l'industrie du vêtement?
- BeanPostProcessor 和 BeanFactoryPostProcessor
- Daily question 1 - force deduction - there are three consecutive arrays of odd numbers
猜你喜欢
如何看待软件测试培训?你需要培训吗?

Introduction to Ceres Quartet

Autosar SWC在Simulink中Parameter的使用

Idea integrated code cloud

Differences between JSON objects and JSON strings

Effective methods for construction enterprises to select smart construction sites

JVM系列之对象深度探秘

. NETCORE uses redis to limit the number of interface accesses
![[answer all questions] CSDN question and answer function evaluation](/img/32/571c9c5f4eb7f69173ae79b8dcf427.jpg)
[answer all questions] CSDN question and answer function evaluation

项目中 if else 的代替写法
随机推荐
机器学习笔记 - 时间序列使用机器学习进行预测
Summary of some new datasets proposed by cvpr2021
Machine learning notes - time series prediction using machine learning
Redis of NoSQL database (II): introduction to redis configuration file
WordPress adds article topping, password protection, and privacy Tags
YGG cooperated with Web3 platform leader to empower the creative community with Dao tools and resources
uva11825
Tree drop-down selection box El select combined with El tree effect demo (sorting)
[translation] [Chapter 2 ②] mindshare PCI Express technology 3.0
NoSQL数据库之Redis(四):Redis的发布和订阅
Markdown 技能树(8):代码块
Ci tool Jenkins II: build a simple CI project
E-commerce is popular, how to improve the store conversion rate?
Error: GPG check FAILED Once install MySQL
利用IPv6實現公網訪問遠程桌面
BeanPostProcessor 和 BeanFactoryPostProcessor
Qt QFileInfo简介
GenICam GenTL 标准 ver1.5(3)第四章
[QNX Hypervisor 2.2用户手册]6.2.1 Guest之间通信
LeetCode_动态规划_中等_91. 解码方法