Menu

#183 The About HasBeenInstrumented interface

v1.0_(example)
closed
nobody
None
5
2013-08-18
2013-01-04
李义星
No

关于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.

Discussion

  • Steven Christou

    Steven Christou - 2013-08-18
    • status: open --> closed
    • Group: --> v1.0_(example)
     
  • Steven Christou

    Steven Christou - 2013-08-18

    We removed the HasBeenInstrumented interface.

     

Log in to post a comment.