随笔分类 -  spring

摘要:概要 准备阶段 匹配阶段 执行阶段 准备阶段 当在Web容器第一次用到 前端控制器DispatcherServlet 的时候,会创建其对象并执行init方法 init方法内会创建Spring Web容器,并调用容器refresh方法 refersh过程中会创建并初始化SpringMVC中的重要组件, 阅读全文
posted @ 2022-04-10 18:10 yxhhhhhh 阅读(52) 评论(0) 推荐(0) 编辑
摘要:1. 抛出检查异常导致事务不能正确回滚 @Service public class Service1 { @Autowired private AccountMapper accountMapper; @Transactional public void transfer(int from, int 阅读全文
posted @ 2022-04-10 16:38 yxhhhhhh 阅读(25) 评论(0) 推荐(0) 编辑
摘要:一.什么是AOP? AOP(Aspect Oriented Programming)是面向切面编程,它是一种编程思想,是面向对象编程(OOP)的一种补充。面向对象编程将程序抽象成各个层次的对象,面向切面编程将程序抽象成各个切面。所谓切面,相当于应用对象间的横切点,我们可以将其单独抽象为单独的模块。 阅读全文
posted @ 2022-04-10 16:24 yxhhhhhh 阅读(29) 评论(0) 推荐(0) 编辑
摘要:bean生命周期 概述 protected <T> T doGetBean( String name, @Nullable Class<T> requiredType, @Nullable Object[] args, boolean typeCheckOnly) bean的生命周期从调用BeanF 阅读全文
posted @ 2022-04-09 19:22 yxhhhhhh 阅读(45) 评论(0) 推荐(0) 编辑
摘要:spring refresh概述: refresh 是 AbstractApplicationContext 中的一个方法,负责初始化 ApplicationContext 容器。容器必须调用refresh才能正常工作。它的内部主要会调用12个方法,我们把它们称为refresh的12个步骤。 pre 阅读全文
posted @ 2022-04-09 17:33 yxhhhhhh 阅读(68) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示