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

相关推荐
iCxhust2 分钟前
C#双时区时钟设计
开发语言·c#
wuminyu4 分钟前
JVM规范学习总结:class执行性能差异
java·linux·c语言·jvm·c++
sbjdhjd9 分钟前
从污点追踪断点到 PHP-FPM 请求队列:HIDS PHP WebShell 样本复盘
开发语言·网络安全·数据挖掘·渗透测试·开源·php·shell
一条泥憨鱼15 分钟前
【RabbitMQ】高级篇
java·分布式·rabbitmq·php·ruby
京师20万禁军教头22 分钟前
50-常用类-Arrays
java
寰梦24 分钟前
Spring Boot + MinIO 大文件上传完整实战:MD5 秒传、分片上传、断点续传与引用一致性
java·spring boot·文件上传·minio
行者-全栈开发28 分钟前
【码动四季·秋】把 Spring Boot 的 Tomcat 换成 Undertow:一次容器替换的三处暗坑
spring boot·tomcat·容器化·依赖管理·undertow
SEO_juper39 分钟前
Go 站点地图生成器:从首页爬全站,一键生成 sitemap.xml
xml·开发语言·人工智能·golang·node.js·seo·外贸独立站
长弓三石41 分钟前
Spring Boot 4.1 + AgentScope:企业级 Agent 平台的 MCP 双向集成实战
人工智能·spring boot·后端·harness·开源智能体
懂点Tech8 小时前
ctfshow misc28:GIF 高度修改解题与脚本实现
开发语言·windows·python