Hibernate session FlushMode有五种属性:
1、NEVEL:已经废弃了,被MANUAL取代了
2 MANUAL:
如果FlushMode是MANUAL或NEVEL,在操作过程中hibernate会将事务设置为readonly,所以在增加、删除或修改操作过程中会出现如下错误
org.springframework.dao.InvalidDataAcce...
分类:
Web程序 时间:
2014-12-14 17:15:36
阅读次数:
231
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="ht...
分类:
数据库 时间:
2014-12-14 13:22:11
阅读次数:
280
package com.sishuok.mvc.controller; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Aut...
分类:
编程语言 时间:
2014-12-12 19:28:06
阅读次数:
205
经过排查,发现项目里面的日志组件是logback, slf4j的一个实现方式。有效日志如下所示。 log4j:WARN?No?appenders?could?be?found?for?logger?(org.springframework.web.context.ContextLoader).
log4j:...
分类:
系统相关 时间:
2014-12-12 17:11:46
阅读次数:
259
一.Bean的定义 二.Bean的初始化: 1.实现org.springframework.beans.factory.InitializingBean接口,覆盖afterPropertiesSet方法.来实现初始化工作 public class ExampleInitalizingBean implements InitializingB...
分类:
其他好文 时间:
2014-12-11 19:29:22
阅读次数:
275
spring配置文件:applicationContext.xml
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p...
分类:
编程语言 时间:
2014-12-11 14:06:14
阅读次数:
162
****************注:该文章来自博客园,转载只为保存,便于查询。**********************org.springframework.aop ——Spring的面向切面编程,提供AOP(面向切面编程)的实现org.springframework.asm——spring 2...
分类:
编程语言 时间:
2014-12-11 13:39:55
阅读次数:
151
spring data mongodb中,如果对象中的属性不想加入到数据库字段中,可加@Transient注解,声明为透明属性spring data mongodb 官网帮助文档http://www.boyunjian.com/javadoc/org.springframework.data/spr...
分类:
数据库 时间:
2014-12-11 12:16:07
阅读次数:
270
今天在把自己的项目转为maven架构的时候,居然碰到了一个很奇葩的问题具体如下:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from class pat....
分类:
编程语言 时间:
2014-12-10 17:55:32
阅读次数:
1240
第一步:自定义异常处理类实现HandlerExceptionResolver接口 import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?org.springframework.web.servlet.Han...
分类:
编程语言 时间:
2014-12-10 16:34:13
阅读次数:
183