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

  • @Configurable and dependencycheck

    I have a domain object with

    Code:
     
    @Configurable(autowire=Autowire.BY_TYPE,dependencyCheck=true)
    public class MyDomainObj {
    
                @Autowired
    	private AService _aService;
    
    	@Autowired
    	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.
Working...
X