问题
I need an oracle.jdbc.OracleConnection to directly work with ORACLE's SDO_GEOMETRY.
I have an Object that is of type: class com.zaxxer.hikari.proxy.ConnectionJavassistProxy
My debugger says its value is: ConnectionJavassistProxy(1082639682) wrapping oracle.jdbc.driver.T4CConnection@220c1ab2
Note that T4CConnection implements oracle.jdbc.OracleConnection
So if I can get access to it, I will have what I need.
回答1:
OracleConnection oracleConnection = connection.unwrap(OracleConnection.class);
来源:https://stackoverflow.com/questions/36803122/how-can-i-get-an-oracle-jdbc-oracleconnection-when-using-hikari