spring

Spring循环依赖与三级缓存

techzealot
spring循环依赖与三级缓存 单例对象三级缓存出处 //org.springframework.beans.factory.support.DefaultSingletonBeanRegistry /** Cache of singleton objects: bean name to bean instance.

Spring事务

techzealot
spring事务 声明式事务 声明式事务底层由spring AOP支持 引入依赖spring-boot-starter-jdbc即可使用开箱即用的声明式事务支持 @Service public class OrderService { @Autowired private StoreService storeService; @Transactional(rollbackFor = Exception.

Springboot

techzealot
springboot知识总结 bootstrap phase bootstrap阶段是springboot中为应用容器准备启动环境的阶段。该阶段最先运行,会产生BootstrapContext,为ApplicationContext准备配置文件,加载其他需要资源。BootstrapContext为ApplicationContext的父容器,其中的配置属性和Bean对于子容器均可见。该阶段会读取bootstrap.yml(properties)配置文件并存储于BootstrapContext,以便与ApplicationContext相关配置隔离。 应用: 配置远程配置中心地址并从中获取应用配置,如Apollo和spring cloud config 可以作为测试上下文所需资源的承载环境,如**testcontainers-spring-boot** 注意事项: