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

相关推荐
天天被压力12 分钟前
【跨市场数据实战 #08】可转债折价机会怎么筛:3个接口抓比价、列表和实时盘口
java·人工智能·python
aramae27 分钟前
MySQL内置函数(7)
开发语言·笔记·后端·mysql·其他
张某布响丸辣1 小时前
附件下载的安全边界:路径白名单、NAS 哨兵文件与 Redis Lua 一次性令牌
java·redis·redis lua·nas哨兵
YatHinLay2 小时前
Spring Boot + Calcite 实现跨库查询
java
酷炫码神2 小时前
MosMos 创意效果与能力边界展示
java
Wang's Blog2 小时前
Java 接入Redis: 使用Jedis操作Redis
java·服务器·redis
事圆则缓2 小时前
Java 8 Lambda、Stream、Optional 与 Android 边界:从回调语法到运行时兼容
android·java
shehuiyuelaiyuehao2 小时前
算法50,分治归并,数组中的逆序对
java·算法
烽学长2 小时前
(附源码)基于Springboot+vue的图书阅读分享系统的设计与实现
java·spring boot·后端
Ivanqhz2 小时前
数据搬运是性能关键
java·服务器·网络·人工智能·深度学习