
Spring
文章平均质量分 69
WhataNerd
欢迎访问:danght.github.io
展开
-
Spring中的事务传播行为
在 Spring 中可以使用 @Transactional 注解,将一个方法标记为一个事务方法 事务方法具有事务的 ACID 四大特性其中 @Transactional 有一个属性 propagation 用来标记该事务的传播行为 Spring 支持的传播行为有这样几种: 默认情况是:REQUIRED接下来举例说明:/** * 购买一本书 * 事务传播行为: REQUIRED */原创 2017-12-05 16:27:37 · 571 阅读 · 0 评论 -
AOP面向切编程及在Spring中的使用方法
AOP 简介AOP(Aspect-Oriented Programming, 面向切面编程): 是一种新的方法论, 是对传统的 OOP(Object-Oriented Programming, 面向对象编程)的补充AOP 的主要编程对象是切面(aspect)在应用 AOP 编程时, 仍然需要定义公共功能, 但可以明确的定义这个功能在哪里, 以什么方式应用, 并且不必修改受影响的类AOP 的好处:每原创 2017-11-17 17:17:35 · 674 阅读 · 0 评论 -
IDEA中Spring配置错误:class path resource [.xml] cannot be opened because it does not exist
如果在运行 Spring 项目时出现了类似于:class path resource [applicationContext.xml] cannot be opened because it does not exist这样的异常 意思就是没有找到你的 .xml 配置文件原因我可以肯定你一定用的是 ApplicationContext ctx = new ClassPathXmlApplicati原创 2017-10-29 16:14:06 · 116773 阅读 · 22 评论