I\'m trying to connect to Firebird database using Spring Data JDBC and Spring Boot. I\'ve created a simple app using Spring Tools. Spring Data JDBC doesn\'t recognize the di
I found myself facing the same issue after upgrading to SB 2.3.0. Mark's excellent answer (which btw has found itself to Spring Data migration docs), helped me solve it, but I found that adding the extra configuration to META-INF
less than ideal.
My solution, extending from the original answer:
jdbcDialect()
:@Configuration
public class SpringDataJdbcConfiguration extends AbstractJdbcConfiguration {
@Override
public Dialect jdbcDialect(NamedParameterJdbcOperations operations) {
return operations.getJdbcOperations().execute((ConnectionCallback)
connection -> isInformix(connection) ? InformixDialect.INSTANCE : super.jdbcDialect(operations));
}
private boolean isInformix(Connection connection) throws SQLException {
return connection.getMetaData().getDatabaseProductName().toUpperCase().contains("INFORMIX");
}
}