Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @Component
  2. @Aspect
  3. public class Enable{
  4.  
  5. private NameService nameService;
  6.  
  7. @Autowired
  8. public void SetNameService(NameSerice service){
  9. // service is injected properly
  10. this.nameSerice = service;
  11. }
  12.  
  13. @Before("* *.*(..)")
  14. public void callBefore(JoinPoint jp){
  15. //sometimes nameService is null and sometimes it not not
  16. this.nameService.lookup(...);
  17. }
  18. }
  19.  
  20. <context:spring-configured/>
  21.  
  22. <aop:aspectj-autoproxy />
  23.  
  24. @Configurable
  25. @Aspect
  26. public class Enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement