,spring3 注解事务 回滚失败
发布时间:2010-05-31 07:02:36 文章来源:www.iduyao.cn 采编人员:星星草
求助,spring3 注解事务 回滚失败
Java code
<?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.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<context:annotation-config />
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="url">
<value>jdbc:mysql://localhost:3306/hterp_2011?useUnicode=true&characterEncoding=UTF-8
</value>
</property>
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="username" value="root"></property>
<property name="password" value="root"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="com.blooming.impl" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<!--
<prop key="hibernate.hbm2ddl.auto">update</prop>
-->
</props>
</property>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="messages/messages" />
<property name="cacheSeconds" value="0" />
</bean>
<context:component-scan base-package="com.blooming.impl.*" />
<context:component-scan base-package="org.springframework.samples.mvc.basic.account"></context:component-scan>
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
<mvc:annotation-driven />
<mvc:interceptors>
<bean class="com.blooming.web.handler.UserInterceptorAdapter" />
</mvc:interceptors>
<bean
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="mediaTypes">
<map>
<entry key="html" value="text/html" />
<entry key="json" value="application/json" />
</map>
</property>
</bean>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="1000000" />
</bean>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/classes/views/" />
<property name="suffix" value=".jsp" />
</bean>
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/>
</beans>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
其他相似内容:
-
一段JS代码看不懂
JScript code
function Designer_Builder(designer) {
//属性
this.owner = designer || null;
。。。...
-
共享struts2.1.8+Hibernate3.3+spring2.5.6+extjs3.2的最新版图书管理系统,奋战两周。
写这个系统,是学习的目的,不是真正当项目写...
-
postgreSQL有没有contains函数?
update base_admin set allchildid=allchildid||'00' where CONTAINS(allchildid,'test')
报此错...
-
ssh整合问题,老是提示连接已关闭!
在网上下的一个ssh整合例子,例子是使用的mysql数据库 ,我改成了sqlserver,老是报连接已关闭的错误!高...
-
jsp新手求助,那位大虾进来看看
1楼
我用的是EditPlus来编写jsp页面,我也安装了Tomcat 5.0的jsp引擎,但是我在Editplus编写好了jsp代...
-
apache的HttpClient4.x如何实现跨域访问
请问httpclient如何实现跨域的登录及登录后访问。比如登录为login.xxx.net/login.do,查询...
-
请教一个gson转换的问题
String hql="from VdDicMedicine where c17='1'";
List<VdDicMedicine> list=dao.getList(hql);
...
-
jsp跳转到servlet
[b][/b]晕死啊,我在jsp跳转到servlet这个页面老是出现404错误,我的一些歌环境配置我可以检查了好几遍没发现什么...
-
小弟问个java流读取的问题
image_location是形如/xxxx/image_tmp/2007/6/1/14/的 路径字符串
目的是想 从 /xxxx/image_...
-
struts上传图片
请求帮助 我把图片上传到服务器端,怎么在获得这个图片啊
我获得图片在tomcat下的路径 为什么获得不到图片??
----...