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

相关推荐
ZJU_统一阿萨姆10 分钟前
【算子开发】全局内存访问与合并访存
java·服务器·网络·人工智能·语言模型
heimeiyingwang27 分钟前
【架构实战】Kubernetes网络模型深度解析:从Pod通信到Ingress网关实战
开发语言·架构·php
71777733 分钟前
不止工具集成:基于 Gitee 软件工厂构建 DevSecOps 研发治理底座
java·服务器·gitee
gis开发之家40 分钟前
Spring Boot 4 深度解析——参数接收大全:@RequestParam、@PathVariable、@RequestBody
java·spring boot·后端·spring
(轻舟已过万重山)1 小时前
D1 · 融合蓝图:Spring AI + 虚拟线程 + 服务网格——现代后端统一底座
java·人工智能·spring
SamDeepThinking1 小时前
警惕那些很长时间没有编写任何代码、却在设计系统的人
java·后端·架构
莫得感情 o1 小时前
并发 13 · 异步编排
java·并发
TizzyGoodhealth1 小时前
从零到一搭建Spring‑AI原生Tool‑Calling AI Agent|架构对比+完整实战源码+踩坑实录
java·ai·知识库·rag·ai agent·spring ai
luj_17681 小时前
变频技术核心原理揭秘
服务器·c语言·开发语言·经验分享·算法
mmsx1 小时前
置灰按钮为什么自己又“亮“了?一次状态缓存“双写冲突“的排查记录
java·缓存·bug·livedata