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

相关推荐
記億揺晃着的那天10 分钟前
告别误操作!Spring Boot 多环境配置隔离与启动守卫实战
java·spring boot·后端·环境隔离
我是唐青枫18 分钟前
Java Spring Data JPA 实战指南:Repository 查询、分页与实体映射
java·开发语言
张忠琳33 分钟前
【Go 1.26.4】(Part 2) Go 1.26.4 超深度分析 — Runtime GMP 调度器 (proc.go + runtime2.go)
开发语言·golang
染翰1 小时前
Nacos 切换 Namespace 后配置不生效、占位符报错终极复盘
java·后端·spring·nacos
terry6001 小时前
2026图形验证码服务商横向测评|口碑、接入、安全选型全指南
java·大数据·人工智能·web安全·信息与通信·数据库架构
阿坤带你走近大数据1 小时前
java中泛型不能用基础数据类型
java·开发语言
skywalker_111 小时前
SpringBoot速通(实战教学)
java·spring boot·redis·rpc·ssm·mybatis-plus
weixin_307779131 小时前
从脚本执行到智能体协作:AI辅助测试能力的范式重构
运维·开发语言·人工智能·算法·测试用例
云絮.1 小时前
增删改查操作
java·开发语言
themingyi1 小时前
Abaqus2024安装python包pandas
开发语言·python·pandas