This is no longer an issue with 7.1 FP10+.
Recently, LPS-85683 was implemented in Liferay DXP 7.1's core infrastructure and can be deployed by applying DXP 7.1 Fix Pack 3. LPS-85683 detailed a project where Liferay core engineers refactored the spring extender to allow for subsequent incremental improvements in the core with the overall goal to improve performance. This was done by splitting the application context into parent (the extender's spring files) and child (the service builder service's spring files). By making this change, we can register the extender services earlier and separately from the service builder services and in the future disable some of the unused features in the parent application context.
However, at the same time, this caused specifically any customized modules connecting to an external data source that are being added via spring beans using Liferay's Spring Extender to stop working after applying Fix Pack 3. You should first read the tutorial Connecting Service Builder to External Databases to get the setup instructions before continuing.
This is a JNDI Blade sample that demonstrate how the
spring.xml is used to connect to another external data source: https://github.com/liferay/liferay-blade-samples/tree/7.1/gradle/apps/service-builder/jndi.
Note: This affects only Liferay DXP 7.1
Beginning with FP-3 (to FP-9):
- In the module, move the overriding
/../src/main/resources/META-INF/spring/into the folder
- Redeploy the module.
As noted earlier, this is because the application context was split into parent (the extender's spring files) and child (the service builder service's spring files).