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 的负载保护

相关推荐
小当家.1052 分钟前
工具并行调用原理与实现:CompletableFuture 实战
java·agent·线程池·工具·并行
曾小猫3 分钟前
20编辑型描述符的使用
开发语言
禁默4 分钟前
信创实战:Python + SQLAlchemy 接入金仓数据库(从驱动安装到完整 CRUD)
开发语言·数据库·python
数字会议深科技11 分钟前
集团总部如何集中管控全国分支机构的录音?——音频采录云管方案解析
开发语言·人工智能·会议解决方案·音频采录云管方案·集团·阵列麦克风·会议设备
lingran__19 分钟前
C++ STL 关联式容器万字详解:set、multiset、map、multimap|接口用法 + 易错点 + 力扣真题实战
开发语言·c++·stl·set·map·红黑树·关联式容器
c2385627 分钟前
C/C++每日一练21
c语言·开发语言·c++
qq_4017004128 分钟前
Qt Modbus协议0x00
开发语言·qt
yushikong30 分钟前
关于rust开发ch32x033f8p6的一些记录
开发语言·后端·rust
wangjialelele33 分钟前
Spring Cloud 全体系学习笔记(REST、Nacos、Feign、Gateway)
java·spring boot·笔记·学习·spring·spring cloud·gateway
吴声子夜歌42 分钟前
正则表达式——环视
开发语言·正则表达式