Search code examples
spring-bootannotationsejbearmulti-module

Injecting Spring managed beans in EJBs and injecting EJBs in Spring Controllers


I am getting NullpointerException when calling EJB

Issue relates more to ways of configuring EJBs so that they can be injected in spring Controllers and Injecting Service classes into EJBs.


Solution

  • Make sure all beans defined are known to spring application context A work around to injecting beans in EJBs is to use @PostContruct, this is the only way I could get everything working but a better example of a working setup could be more appreciated.