I have my business bean defined thus:
@Local
@Interceptors(BusinessInterceptor.class})
public class MyBean implements SomeBean { ... }
And then I want my BusinessInterceptor
to be configured with Spring's SpringBeanAutowiringInterceptor
:
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class BusinessInterceptor {
@Autowired
private SomeSpringBean someSpringBean;
}
Is this allowed/legal? I'm getting errors (NPEs, mostly) suggesting that the fields in BusinessInterceptor
have not been initialized properly.