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

相关推荐
SL_staff6 分钟前
JVS数字底座实践:如何复用企业文档能力快速构建知识类应用
java·数据库·程序员
程序员天天困6 分钟前
Spring Boot i18n 国际化实战:从资源文件到多语言接口完整指南
spring boot·后端·编程语言
sugar__salt8 分钟前
MyBatis ③动态 SQL 完全指南 —— 从条件拼接到批量操作
java·sql·mybatis
吴声子夜歌9 分钟前
正则指引——PHP
开发语言·正则表达式·php
吃饱了得干活20 分钟前
Java并发安全:看这一篇就懂了!
java·后端·面试
前端双越老师22 分钟前
前端学习 Java 其实很容易:TS 和 Java 语法的 N 个相同点
java·全栈
Claire_8822 分钟前
企业文件管理系统选型技术框架与主流产品对比分析
开发语言·php
(Charon)30 分钟前
【C++】:使用 mutex + deque 实现一个简单的 LockedQueue
开发语言·c++
星轨初途39 分钟前
LeetCode 热题 100——day10 和为 K 的子数组
开发语言·c++·算法·leetcode
sycmancia41 分钟前
Qt——自定义控件温度计
开发语言·qt