If you want to use a database separate from Liferay DXP’s, follow these steps:
Specify your database and a data source name in your
Create the database manually.
Define the data source.
Connect your Service Builder module to the data source.
Run Service Builder.
There are two different ways to create the connection:
DataSourceProvider: This approach involves implementing a
ServiceProviderInterface(SPI). This way requires the fewest files and steps and works regardless of whether your Service Builder module uses the
Spring Beans: Configure the connection using Spring XML files. This approach only works with Service Builder modules that use the
springdependency injection option.
DataSourceProvider is the easiest, most versatile approach, it’s