Spring事务不生效的几种场景

Spring事务不生效的几种场景Myisam引擎不支持事务。方法不是public并且加了static或final方法也不会生效。(因为底层是Aop)Spring默认只会回归RuntimeException和Error异常,对于普通的Excetption异常不会回滚。不能手动try隐藏错误。调用本类的


Spring生命周期

无参构造方法new对象依赖注入 @Autowired (三级缓存)初始化前 @PostConstruct初始化 实现InitializingBean的afterPropertiesSet方法


SpringClond之feign分析

issue 1:Feign作为springclod微服务之间相互通信的桥梁,那么它是怎么做到两个服务之间的调用的呢?issue 2:Feign除了服务之间通讯还有什么强大功能封装呢?Answer 1:首先我们来看一下feignClient配置的参数有哪些:@FeignClient(name = “n


Spring 5 学习

Spring 5@RestControllerpublic class WebFluxController { @RequestMapping("getJson") public Mono<User> getJson() { User use


PopulateBean的过程

属性注入的过程public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFactoryimplements AutowireCapableBeanFactory{ /** * Populate the


Bean工厂

刷新bean工厂、生产内部bean工厂,DefaultListableBeanFactory设置序列化IDprotected final void refreshBeanFactory() throws BeansException {if (hasBeanFactory()) {destroyBe


Bean创建过程

从AbstractAutowireCapableBeanFactory说起、AbstractAutowireCapableBeanFactory顾明思议、是带有自动注入功能的BeanFactory、我们先看他的类继承结构如上图所示、AbstractAutowireCapableBeanFactory


AnnotationConfigApplication学习

测试类入口:AnnotationConfigApplicationContextTests test = new AnnotationConfigApplicationContextTests();test.scanAndRefresh();类图如下。由类机构图可以知道AnnotationConfi


refresh学习

首先进入AbstractApplication中的refresh()方法中如下public void refresh() throws BeansException, IllegalStateException {synchronized (this.startupShutdownMonitor)