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

相关推荐
aXin_ya1 分钟前
微服务 第一天
java·运维·微服务
无限进步_3 分钟前
【C++】私有虚函数与多态:访问权限不影响动态绑定
开发语言·c++·ide·windows·git·算法·visual studio
8Qi85 分钟前
Elasticsearch 初识篇:核心概念与环境搭建
java·大数据·分布式·elasticsearch·搜索引擎·中间件
霸道流氓气质7 分钟前
SpringBoot中集成LangChain4j实现集成阿里百炼平台进行AI快速对话
人工智能·spring boot·后端·langchain4j
lolo大魔王10 分钟前
Go语言的结构体
开发语言·后端·golang
lly20240613 分钟前
C 作用域规则
开发语言
阿正的梦工坊14 分钟前
JavaScript 函数作用域详解——为什么函数外面访问不到里面的变量?
开发语言·javascript
消失的旧时光-194316 分钟前
Spring 核心思想解析:IoC 与 DI 一文讲透(从入门到工程理解)
java·ioc·di
小梁努力敲代码19 分钟前
抽奖系统-测试报告
java·功能测试
DS数模26 分钟前
2026年Mathorcup数学建模竞赛A题思路解析+代码+论文
开发语言·数学建模·matlab·mathorcup·妈妈杯·2026妈妈杯