随笔分类 -  SSH2

OpenSessionInViewFilter与org.springframework.dao.InvalidDataAccessApiUsageException
摘要:报错:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.搞开发的时候碰到这个问题,在网上搜了一下原因,归纳成以下几个知识点,部分摘抄网络原文: 1、延迟加载: 阅读全文

posted @ 2012-08-02 17:04 Iuranus 阅读(11518) 评论(0) 推荐(1)

关于Spring中的<context:annotation-config/>配置
摘要:当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredAnnotationBeanPostProcessor的Bean:<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor "/> 使用 @Required注解,就必须声明RequiredAnnotationBeanPostProcess 阅读全文

posted @ 2012-07-19 13:01 Iuranus 阅读(86764) 评论(7) 推荐(16)

导航