使Spring 3 MVC控制器方法具有事务性

使Spring 3 MVC控制器方法具有事务性,第1张

使Spring 3 MVC控制器方法具有事务性

您需要实现一个接口,以便Spring可以将其用作代理接口:

@Controllerpublic interface AuthenticationController {  ModelAndView home(HttpServletRequest request, HttpServletResponse response);}@Controllerpublic class AuthenticationControllerImpl implements AuthenticationController {@RequestMapping(value="/home.html",method=RequestMethod.GET)@Transactional@OverrideModelAndView home(HttpServletRequest request, HttpServletResponse response){.....}}


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5621787.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-15
下一篇2022-12-15

发表评论

登录后才能评论

评论列表(0条)

    保存