Spring Cloud
程序员文章站
2022-05-06 08:00:07
...
Spring Cloud
DefaultListableBeanFactory beanFactory = unwrapDefaultListableBeanFactory(registry);
if (beanFactory != null) {
if (!(beanFactory.getDependencyComparator() instanceof AnnotationAwareOrderComparator)) {
// AnnotationAwareOrderComparator 主要解析@Order注解和@Priority注解
beanFactory.setDependencyComparator(AnnotationAwareOrderComparator.INSTANCE);
}
if (!(beanFactory.getAutowireCandidateResolver() instanceof ContextAnnotationAutowireCandidateResolver)) {
// ContextAnnotationAutowireCandidateResolver 提供处理延迟加载的功能
beanFactory.setAutowireCandidateResolver(new ContextAnnotationAutowireCandidateResolver());
}
推荐阅读
-
Spring MVC源码(一) ----- 启动过程与组件初始化
-
Spring Cloud Alibaba | Sentinel: 服务限流高级篇
-
spring事务的@Transactional使用事务不生效问题
-
Spring AOP创建Throwdvice实例
-
.NET CORE与Spring Boot编写控制台程序应有的优雅姿势
-
javaweb各种框架组合案例(六):springboot+spring data jpa(hibernate)+restful
-
Hello,Cloud 2012云世界即将打开大门
-
Spring的基本配置及概念
-
Spring MVC的常用注解
-
Spring使用小结