-
Oct 12th, 2011, 02:16 AM
#1
@Autiwired ( modify value with AOP )
Hi
I have many class annotated with spring sterotypes
while running unit testing ( extending AbstractTransactionalSpringContextTests ) i am testing layered xmls , hence i get " Unsatisfied dependency of type ...." it is quite obviuos i get this exception becuase bean defintions for those were in other xmls which i didnt inlcude .
Question(s)
1) How can modify my derived class of "AbstractTransactionalSpringContextTests" set load beans as required (or) dont check dependency during the spring load time ( i used setDependenchCheck(false) ,But no luck )
2) Is it possible for me to override required to false in @autowired using AOP ( i dont want to change the class like @Autowired(required=false) instead i would know is there any way to do with Interceptors or AOP
i will use this interceptor to covey to spring frmk that autowired .required = false
let me know if there any alternatives to achive the same .
Thanks in advance for help .
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules