Here's a piece of Spring config file:
@Bean
public GenericDao<Foo> fooDao() {
return new GenericDao<>(Foo.class);
}
@Bean
@DependsOn("fooDao")
public GenericService<Foo> fooService() {
return new ApplicationGenericService<>(fooDao(), applicationMessageProducer());
}
@Bean
@DependsOn("fooService")
public GenericService<Foo> decoratedFooService() {
return new ServiceDecorator<>(fooService(), decoratorService());
}
For some reason, Spring passes null
to ApplicationGenericService
constructor.
Any ideas how to fix this issue?