Skip to content

Commit e619a41

Browse files
committed
Add LogBeanFactoryPostProcessor.java
1 parent 209cbc6 commit e619a41

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package spring.oldboy.bean_factory_pp;
2+
3+
import org.springframework.beans.BeansException;
4+
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
5+
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
6+
import org.springframework.core.Ordered;
7+
import org.springframework.core.PriorityOrdered;
8+
9+
public class LogBeanFactoryPostProcessor implements BeanFactoryPostProcessor, PriorityOrdered {
10+
11+
@Override
12+
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws
13+
BeansException {
14+
System.out.println("1.postProcessBeanFactory - LogBeanFactoryPostProcessor");
15+
}
16+
/*
17+
Влияем на порядок инициализации (запуска) наших экземпляров BeanFactoryPostProcessor bean-ов
18+
*/
19+
@Override
20+
public int getOrder() {
21+
return Ordered.LOWEST_PRECEDENCE;
22+
}
23+
}

0 commit comments

Comments
 (0)