随笔分类 -  02. 框架

摘要:概述 事务原本是数据库中的概念,用于数据访问层。但一般情况下,需要将事务提升到业务层,即 Service 层。这样做是为了能够使用事务的特性来管理具体的业务。 在 Spring 中通常可以通过以下三种方式来实现对事务的管理: 使用 Spring 的事务代理工厂管理事务(已过时) 使用 Spring 阅读全文
posted @ 2021-09-26 14:09 1766Af 阅读(53) 评论(0) 推荐(0)
摘要:类关系图 AopProxyFactory public interface AopProxyFactory { /** * Create an {@link AopProxy} for the given AOP configuration. * @param config the AOP conf 阅读全文
posted @ 2021-09-24 12:58 1766Af 阅读(46) 评论(0) 推荐(0)
摘要:整理流程图 Cglib 生成对象 BeanUtils#instantiateClass{ return ctor.newInstance(argsWithDefaultValues) } 由上图可知,最终会调用 AppConfig 的构造方法来生成对象 阅读全文
posted @ 2021-09-24 12:55 1766Af 阅读(46) 评论(0) 推荐(0)
摘要:Spring MVC 拦截器的执行顺序 应用场景 假设请求 localhost:8080/ 则要求直接重定向到 localhost:8080/login ; 定义拦截器顺序 permission login 执行顺序 pre 先执行先定义的,而 post 和 after 先执行后定义的。 阅读全文
posted @ 2020-01-30 15:44 1766Af 阅读(114) 评论(0) 推荐(0)