关于HasBeenInstrumented是一个接口的问题,如果需要覆盖,那么需要实现该接口。而问题就在这里。
如果一个spring mvc action
@Controller
public class MockAction {
@Autowired
private MockServiceI mockService;
/**
*
* 描述:直接返回一个视图
*
* @return
* @author liyixing 2012-12-11 下午2:15:04
*/
@RequestMapping("getView")
@NoSuccessMessage
public String getView(ModelMap modelMap, MockModel mockModel,
BindingResult bindingResult, HttpServletRequest request,
HttpServletResponse response, HttpSession session, Integer integer) {
return "action";
}
}
并且存在aop,会拦截该action,并且,代理模式是jdk 代理。问题就大大的存在了。
The About HasBeenInstrumented is an interface problem, if you need coverage, you need to implement the interface. And the problem here.
If a spring mvc action
@ Controller
public class MockAction {
@ Autowired
private MockServiceI mockService;
/ **
*
* Description: Returns a view directly
*
* @ Return
* @ Author liyixing 2012-12-11 afternoon 2:15:04
* /
@ RequestMapping ("getView")
@ NoSuccessMessage
public String getView (ModelMap modelMap, MockModel mockModel,
BindingResult bindingResult, HttpServletRequest request,
HttpServletResponse response, HttpSession session, Integer integer) {
return "action";
}
}
And there aop, will block the action, and proxy mode jdk agent
Problem exist.
We removed the HasBeenInstrumented interface.