SSH整合,增删查改,就增加不成功,帮忙看下i ssh 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Debug断点调试的时候 excute 方法 里面的属性 都看不了值 就像bug一样,直接跳过断点 其他的也没提交事务啊难道只有insert需要提交事物吗 这样添加事务配置 对不对 <!-- 配置spirng声明事务管理 --> <bean id="hibernateTransactionManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory" ref="sessionFactory" /></bean><!--事务通知--> <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes> <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*" propagation="NOT_SUPPORTED"/><tx:method name="find*" propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice> 请问怎么写事务。没有错误信息,就是不能实现 保存到数据库的功能 不能触发insert SSH整合的时候 如何配置事务管理呢 你user实体类里面的userId怎么生成的 你把断点打到service里看下 <!-- <aop:config> <!--定义一个切入点--><aop:pointcut id="tranPointCut" expression="execution(com.integration.service.UserService"/><!--定义方面: 通知织入到切面--><aop:advisor advice-ref="logAdvice" pointcut-ref="tranPointCut"/></aop:config> <!--事务通知--> <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes> <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*" propagation="NOT_SUPPORTED"/><tx:method name="find*" propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice> -->这段代码 可以起到自动开启事务 回滚事务吗?expression="execution(com.integration.service.UserService"/>这句 里面的包 我看API文档是 expression="execution(* com.xyz.myapp.service.*.*(..)) && this(service)"/>不知怎么个意思 为什么updata都可以正常修改 没有添加事务 insert需要呢 可恶的粗心啊 又一次写错单词 难怪4级过不了啊execute 写出excuteeclipse还不报错。。结贴了 感谢各位回帖帮忙 3Q 极度郁闷的启动错误 用hibernate的一个问题 有网站做,有兴趣的进来看看!................................... 请问各位,昨日贴数,今天贴数,和最高日贴数,是怎么实现的 如何根据地址栏找到相应文件?——新手问题吗? 高分求救挑战性问题 关于jspsmartupload的问题 数据库连接问题 如果使用一个connection打开两张或两张以上的表? 请问servlet怎么画饼图和直方图 SSH2文件上传 请问http请求header中referer和origin的区别
Debug断点调试的时候 excute 方法 里面的属性 都看不了值 就像bug一样,直接跳过断点
难道只有insert需要提交事物吗
<bean id="hibernateTransactionManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory" ref="sessionFactory" /></bean><!--事务通知--> <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes> <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*" propagation="NOT_SUPPORTED"/><tx:method name="find*" propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice>
没有错误信息,就是不能实现 保存到数据库的功能 不能触发insert
<aop:config> <!--定义一个切入点--><aop:pointcut id="tranPointCut" expression="execution(com.integration.service.UserService"/><!--定义方面: 通知织入到切面--><aop:advisor advice-ref="logAdvice" pointcut-ref="tranPointCut"/></aop:config> <!--事务通知--> <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes> <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*" propagation="NOT_SUPPORTED"/><tx:method name="find*" propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice>
-->
这段代码 可以起到自动开启事务 回滚事务吗?
expression="execution(com.integration.service.UserService"/>
这句 里面的包 我看API文档是
expression="execution(* com.xyz.myapp.service.*.*(..)) && this(service)"/>
不知怎么个意思
为什么updata都可以正常修改 没有添加事务 insert需要呢
可恶的粗心啊
又一次写错单词
难怪4级过不了啊
execute 写出excuteeclipse还不报错。。
结贴了 感谢各位回帖帮忙
3Q