About pit JDBC, JdbcTemplate use encounter

1, if the data sources are Oracle (mysql end can be used " ; " a), at the end of the string is prohibited sql semicolon " ; ", or will be error: java.sql.SQLException: ORA-00911: invalid character

2, when using jdbc oracle database connection, if the drive name using " oracle.jdbc.driver.OracleDriver " error: oracle.jdbc.driver.OracleDriver IS deprecated ., Then the solution is as follows:

Under can try to replace the drive name called: oracle.jdbc.OracleDriver

3, for use jdbcTemplate.update (String sql, @Nullable Object ... args) data insertion time, if the args parameter array a property is null value, the data will lead to NULL can not be inserted

Simple to use JdbcTemplate can refer to: https://segmentfault.com/a/1190000018957484?utm_source=tag-newest

Guess you like

Origin www.cnblogs.com/sung1024/p/11240092.html