Spring MVC + hibernate service层和dao层 方法头上都加上@Transactional会识别哪个 5
SpringMVC+hibernateservice层和dao层方法头上都加上@Transactional会识别哪个service层:@Override@Transact...
Spring MVC + hibernate service层和dao层 方法头上都加上@Transactional会识别哪个
service层:
@Override
@Transactional
public Future save(UserVO userVO) {
this.myUserDao().saveUser(user);
...
dao层:
@Override
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void saveUser(User user) {
save(user);
... 展开
service层:
@Override
@Transactional
public Future save(UserVO userVO) {
this.myUserDao().saveUser(user);
...
dao层:
@Override
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void saveUser(User user) {
save(user);
... 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询