Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component
- @Aspect
- public class Enable{
- private NameService nameService;
- @Autowired
- public void SetNameService(NameSerice service){
- // service is injected properly
- this.nameSerice = service;
- }
- @Before("* *.*(..)")
- public void callBefore(JoinPoint jp){
- //sometimes nameService is null and sometimes it not not
- this.nameService.lookup(...);
- }
- }
- <context:spring-configured/>
- <aop:aspectj-autoproxy />
- @Configurable
- @Aspect
- public class Enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement