general java
mysql driver 버전 5에서 버전 6로 변경시 이슈
'김용환'
2017. 4. 11. 11:10
mysql driver 버전 5에서 버전 6로 변경할 때의 이슈이다.
jdbc url에 serverTimezone도 추가한다.
jdbc driver name을 com.mysql.jdbc.Driver에서 com.mysql.cj.jdbc.Driver로 변환한다.
워닝 및 에러 에러
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
예)
className=com.mysql.cj.jdbc.Driver
url="jdbc:mysql://mydomain:3306/development?useUnicode=true&autoReconnect=true&useTimezone=true&serverTimezone=UTC&connectTimeout=3000&socketTimeout=3000"
...