1. 程式人生 > >數據庫的驅動配置文件

數據庫的驅動配置文件

character password name oda per 數據 etime cal 關註

  下面是MySql數據庫連接配置文件,其中的url中的一些設置我們需要關註.

#jdbc-mysql.properties

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/testDB?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
jdbc.username=root
jdbc.password=12345

#使用Unicode編碼

useUnicode=true

#字符編碼是utf-8

characterEncoding=utf-8

#日期格式處理

zeroDateTimeBehavior=convertToNull

數據庫的驅動配置文件