MySQL中url串的设置,及其他设置(db.properties)

url=jdbc:mysql:  //localhost:3306/shop?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
username=root
password=xxxxxxx
driverClassName=com.mysql.jdbc.Driver
initialSize=  10
maxActive=  20
maxWait=  1000
注释:
rewriteBatchedStatements=  true      //批处理
useUnicode= true //设置编码格式,采用unicode编码
characterEncoding=utf-  8         //设置数据库编码,采用utf-8;(使用utf-8解码)
serverTimezone=GMT%2B8         //设置时区,“GMT%2B8”即GMT+8,东八区北京时间;

 

posted @ 2021-06-21 15:34  Mrzxs  阅读(312)  评论(0)    收藏  举报