7172737475767778798081
WebApplicationContext ctx = ContextLoader.getCurrentWebApplicationContext(); TestLogger logger = ctx.getBean("testLogger", TestLogger.class); logger.start("lalala"); User user = userService.getUserByName("sergey"); userService.save(user); userService.update(user); try { //instanceof doesn't work with proxy aop object aop:declare-parents EntityHeader entHeader = (EntityHeader)userService;
14151617181920
public class MovieController { @RequestMapping(value = "/{name}", method = RequestMethod.GET) public @ResponseBody User getMovie(@PathVariable String name, ModelMap model) { model.addAttribute("movie", name); return new User("aaa", "bbb"); }