Announcement Announcement Module
No announcement yet.
@Configurable and dependencycheck Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Configurable and dependencycheck

    I have a domain object with

    public class MyDomainObj {
    	private AService _aService;
    	private BService _bService;
                private int _something;
                public void setSomething(int something) {_something = something;}
    in my test class which extends AbstractTransactionalDataSourceSpringContextTests
    it seems that the aspect is trying to advice my setSomething(..) method as well.
    (My test fails with a message saying that I have an unsetisfied dependency in my domain object on the setSomething method.

    What can/should i do so that only methods/fields with @Autowired or @Resource annotation are actually adviced - is dependencycheck=true the problem ? I would still like to have the ability to do depencency checking on @Configurable beans but only for fields/methods that I actually want to inject service objects into.