
1 |
public interface { |
1 |
public interface LifecycleProcessor extends { |
优先级
- 主键
- 接口实现
- 全局配置的方法名
If multiple lifecycle mechanisms are configured for a bean, and each mechanism is configured with a different method name, then each configured method is executed in the order listed below. However, if the same method name is configured - for example,
init() for an initialization method - for more than one of these lifecycle mechanisms,
that method is executed once, as explained in the preceding section.
You can also use @Autowired for interfaces that are well-known resolvable dependencies:
BeanFactory , ApplicationContext , Environment , ResourceLoader ,
ApplicationEventPublisher , and MessageSource . These interfaces and their extended interfaces,
such as ConfigurableApplicationContext or ResourcePatternResolver , are automatically
resolved, with no special setup necessary




近期评论