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

相关推荐
yugi9878383 分钟前
MATLAB的多层感知器(MLP)与极限学习机(ELM)实现
开发语言·matlab
heartbeat..29 分钟前
数据库基础知识体系:概念、约束、范式与国产产品
java·数据库·学习笔记·国产数据库
Never_Satisfied31 分钟前
C#获取汉字拼音字母方法总结
开发语言·c#
zh_xuan44 分钟前
kotlin 密封类
开发语言·kotlin
PXM的算法星球1 小时前
【操作系统】哲学家就餐问题实现详解
java
2301_815357701 小时前
Java项目架构从单体架构到微服务架构的发展演变
java·微服务·架构
码小猿的CPP工坊1 小时前
C++软件开发之内存泄漏闭坑方法
开发语言·c++
Ethan-D1 小时前
#每日一题19 回溯 + 全排列思想
java·开发语言·python·算法·leetcode
Echoo华地1 小时前
idea运行程序默认线程为daemon线程的问题
java·ide·intellij-idea
满栀5851 小时前
分页插件制作
开发语言·前端·javascript·jquery