spring面试题
- 游戏开发
- 2025-07-23 06:09:02

1.springboot自动装配
从 这个META-INF/spring-autoconfigure-metadata.properties加载文件
2.springbean 的生命周期
3.spring 如何解绝循环依赖
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; }4. spring cloud zuul 的类型
forward SendForwardFilter,SimpleHostRoutingFilter
pre PreDecorationFilter,FormBodyWrapperFilter,DebugFilter
post LocationRewriteFilter,SendErrorFilter,SendResponseFilter
5.spring cloud 的 eureka 的负载保护