I am trying to set up a second data source in my Spring application. Below are the 2 configuration classes for the 2 data sources:
Primary data source config:
Second data source config
Until now I had Spring Auto configure the data source I had. My domain classes were generated by Database schemes in IntelliJ. So there is under the "Persistence Tab" in Intelli J one EntityManager that was there from the auto configured data source and two more for both aw and snd data sources.
I have several Repositories that are implemented like that:
Then there is for custom methods outside the CRUD Repo features an interface like that:
The implementation of that interface looks like that:
The Repos are used by Autowiring them:
I am getting this exception:
I would highly appreciate any help. I found nothing online that covered that problem. Only if EntitityManagers are implemented manually, which is not the case here.