I am upgrading my project to Spring 5 and I noticed that it no longer has org.springframework.jdbc.support.nativejdbc
package. We use SimpleNativeJdbcExtractor
to extract native JDBC Connection
. Sure I simply can use source code from Spring 4 and embed it into my project however I'd prefer to rely on a well established library.
Spring Framework web site only says that the packages are removed and doesn't offer any alternatives. Search through Spring 5 source code yields nothing. I wonder if anyone here can offer a suggestion on what the alternatives could be.
I assume the reason you want access to the native java.sql.Connection
is because you want access to a vendor connection class so you have access to vendor extensions. If that is the case you can simply use #unwrap(Class)
eg
OracleConnection oracleConnection = connection.unwrap(OraleConnection.class);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With