At the moment, it's only possible to derive the platform from the DataSource
. This is a bit limiting. For example it means that the default schema location cannot be used with a database that isn't known to DatabaseDriver
. The problem can be avoiding by configuring the schema location, for example by replacing the default location of "classpath:org/springframework/integration/jdbc/schema-@@platform@@.sql"
with "classpath:org/springframework/integration/jdbc/schema-sybase.sql"
but it would be easier if just the platform could be configured without having to worry about the actually location of the schema scripts.
Comment From: snicoll
While working on this, I've realized that things have heavily changed in 2.6.x
and I am not sure how to handle it there yet. Handling a shortcut method in PlatformPlaceholderDatabaseDriverResolver
feels a bit odd as we're not reusing any of the DatabaseDriver
mapping stuff. Not doing it means we'd have to copy/paste the replacement in 4 places.
I guess the name of the class as it is makes it hard to expand the scope.