
Spring
sunywz
这个作者很懒,什么都没留下…
展开
-
Spring事务传播(Propagation)
* REQUIRED: 使用当前的事务,如果当前没有事务,则自己新建一个事务,子方法是必须运行在一个事务中的; * 如果当前存在事务,则加入这个事务,成为一个整体。 * 举例:领导没饭吃,我有钱,我会自己买了自己吃;领导有的吃,会分给你一起吃。 * SUPPORTS: 如果当前有事务,则使用事务;如果当前没有事务,则不使用事务。 * 举例:领导没饭吃,我也没饭吃;领导有饭吃,我也有饭吃。.原创 2021-03-23 16:32:56 · 203 阅读 · 0 评论 -
Spring-学习笔记(1)
Spring是一个开源的控制反转(Inversion of Control ,IoC)和面向切面(AOP)的容器框架.它的主要目得是简化企业开发.public class PersonServiceBean { private PersonDao personDao = new PersonDaoBean(); public void save(Person person){原创 2016-07-23 00:03:50 · 353 阅读 · 0 评论 -
最全面的springxml文件约束 applicationContext.xml
<?xml version="1.0" encoding="utf-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springfr原创 2016-08-22 12:18:10 · 10835 阅读 · 0 评论 -
异常积累:org.springframework.dao.InvalidDataAccessApiUsageException Write operations are not allowed in
这种异常就是事务没有开启 1、 转载:文章来源:http://lucky16.iteye.com/blog/673903此异常是由于Spring提供的Open Session In View而引起的。开启OpenSessionInViewFilter这个过滤器的时候FlushMode就已经被默认设置为了MANUAL,如果FlushMode是MANUAL或NEVEL,在操作过程中 hiberna原创 2016-11-06 21:18:13 · 6331 阅读 · 0 评论 -
2 Spring的组成
2.1 Spring的jar包 到http://www.springsource.org/download下载spring,然后进行解压缩,在解压目录中找到下面jar文件,拷贝到类路径下 –spring的核心类库 在spring文档的dist下 dist\spring.jar –引入的第三方类库 都spring文档的lib下 lib\jakarta-commons\commons-lo原创 2017-05-04 15:03:34 · 596 阅读 · 0 评论