Announcement Announcement Module
Collapse
No announcement yet.
@Autiwired ( modify value with AOP ) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @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 .
Working...
X