标签:
在ssh中使用hibernateTemplate来保存对象的时候。出现一个问题,就是saveOrUpdate既不报错。也不在控制台打印插入语句,也不想数据库插入数据。
问题解决:
这个是事务的原因。检查事务的配置是否与使用的包名相应的上
<aop:config>
<aop:pointcut id="smMethod" expression="execution(* com.ggyan.pes.login.service.*.*(..))"/>
<aop:advisor pointcut-ref="smMethod" advice-ref="smAdvice"/>
</aop:config>
getHibernateTemplate().saveOrUpdate 不运行
标签:
原文地址:http://www.cnblogs.com/mengfanrong/p/5208065.html