spring 面试题

1.springboot自动装配

从 这个META-INF/spring-autoconfigure-metadata.properties加载文件

2.springbean 的生命周期

3.spring 如何解绝循环依赖

java 复制代码
private final Map<String, Object> earlySingletonObjects = new ConcurrentHashMap<>(16);
private final Map<String, Object> singletonObjects = new ConcurrentHashMap<>(256);
private final Map<String, ObjectFactory<?>> singletonFactories = new HashMap<>(16);

synchronized (this.singletonObjects) {
			Object singletonObject = this.singletonObjects.get(beanName);
			if (singletonObject == null) {
				beforeSingletonCreation(beanName);
				try {
					singletonObject = singletonFactory.getObject();
					newSingleton = true;
				}
				catch (IllegalStateException ex) {
					singletonObject = this.singletonObjects.get(beanName);

				}
				finally {
					afterSingletonCreation(beanName);
				}
				if (newSingleton) {
					addSingleton(beanName, singletonObject);
				}
			}
			return singletonObject;
		}
  1. spring cloud zuul 的类型

forward SendForwardFilter,SimpleHostRoutingFilter

pre PreDecorationFilter,FormBodyWrapperFilter,DebugFilter

post LocationRewriteFilter,SendErrorFilter,SendResponseFilter

5.spring cloud 的 eureka 的负载保护

相关推荐
誰能久伴不乏2 分钟前
Qt 动态属性(Dynamic Property)详解
开发语言·qt
程序猿阿越6 分钟前
Kafka源码(三)发送消息-客户端
java·后端·源码阅读
javadaydayup8 分钟前
Apollo 凭什么能 “干掉” 本地配置?
spring boot·后端·spring
whitepure12 分钟前
万字详解Java中的运算
java
AAA修煤气灶刘哥13 分钟前
搞定 Redis 不难:从安装到实战的保姆级教程
java·redis·后端
MrSYJ16 分钟前
全局和局部AuthenticationManager
java·后端·程序员
界面开发小八哥21 分钟前
「Java EE开发指南」如何使用MyEclipse中的Web Fragment项目?
java·ide·java-ee·eclipse·myeclipse
枫叶丹442 分钟前
【Qt开发】常用控件(四)
开发语言·qt
FFF-X44 分钟前
Vue3 路由缓存实战:从基础到进阶的完整指南
vue.js·spring boot·缓存