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

相关推荐
无关86881 分钟前
SpringBootApplication注解大解密
spring boot
想用offer打牌3 分钟前
一站式了解Spring AI Alibaba的流式输出
java·人工智能·后端
Lonely丶墨轩4 分钟前
从登录入口窥见架构:一个企业级双Token认证系统的深度拆解
java·数据库·sql
还债大湿兄15 分钟前
huggingface.co 下载有些要给权限的模型 小记录
开发语言·前端·javascript
bkspiderx27 分钟前
C++中的map容器:键值对的有序管理与高效检索
开发语言·c++·stl·map
Hard but lovely29 分钟前
Linux: 线程同步-- 基于条件变量 &&生产消费模型
linux·开发语言·c++
汤姆yu41 分钟前
基于python大数据的协同过滤音乐推荐系统
大数据·开发语言·python
爱学习的小道长43 分钟前
Python Emoji库的使用教程
开发语言·python
Sammyyyyy1 小时前
Symfony AI 正式发布,PHP 原生 AI 时代开启
开发语言·人工智能·后端·php·symfony·servbay
C+-C资深大佬1 小时前
C++逻辑运算
开发语言·c++·算法