File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Spring_part_3/src/main/java/spring/oldboy/bean_factory_pp Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 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+ import org .springframework .stereotype .Component ;
9+
10+ @ Component
11+ public class LogBeanFactoryPostProcessor implements BeanFactoryPostProcessor , PriorityOrdered {
12+
13+ @ Override
14+ public void postProcessBeanFactory (ConfigurableListableBeanFactory beanFactory ) throws
15+ BeansException {
16+ System .out .println ("1.postProcessBeanFactory - LogBeanFactoryPostProcessor" );
17+ }
18+ /*
19+ Влияем на порядок инициализации (запуска) наших экземпляров BeanFactoryPostProcessor bean-ов
20+ */
21+ @ Override
22+ public int getOrder () {
23+ return Ordered .LOWEST_PRECEDENCE ;
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments