grails-core
grails-core copied to clipboard
Multiple datasources can't inject
Expected Behavior
Following the documentation on configuring a second datasource, then trying to use within a service. In application.yml have a datasource block, followed by a datasources block with one datasource defined. Trying to use the second datasource in a service, again following the docs.: DataSource dataSource_lookup
Actual Behaviour
Datasource doesn't get injected, always comes back as null.
Steps To Reproduce
Create a grails app with bare config with two datasources as per documentation. Attempt to use second datasource.
Environment Information
Linux JDK 17
Example Application
No response
Version
5.3.2
It will easier and faster for anyone to help you if you could you please try to use Java 11, and also share a sample application?
Any problem with Java 17? Even with J11 I get the same problem. I will share a sample...