Class DatabaseSchemaLocator
java.lang.Object
org.springframework.modulith.events.jdbc.DatabaseSchemaLocator
Simple wrapper around a
ResourceLoader
to load database specific schema files from the classpath.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorDescriptionDatabaseSchemaLocator
(ResourceLoader resourceLoader) Creates a newDatabaseSchemaLocator
for the givenResourceLoader
. -
Method Summary
Modifier and TypeMethodDescription(package private) Resource
getSchemaResource
(DatabaseType databaseType) Loads theResource
containing the schema for the givenDatabaseType
from the classpath.
-
Constructor Details
-
DatabaseSchemaLocator
DatabaseSchemaLocator(ResourceLoader resourceLoader) Creates a newDatabaseSchemaLocator
for the givenResourceLoader
.- Parameters:
resourceLoader
- must not be null.
-
-
Method Details
-
getSchemaResource
Loads theResource
containing the schema for the givenDatabaseType
from the classpath.- Parameters:
databaseType
- must not be null.- Returns:
- will never be null.
-