1)使用文本或者链接地址写到代码中(不推荐)时,实例如下:
jdbc:mysql://localhost:3306/tms?useUnicode=true&characterEncoding=utf8
2) 使用XML文件时:
jdbc:mysql://localhost:3306/tms?useUnicode=true&characterEncoding=utf8
原文:https://www.cnblogs.com/jock766/p/13070338.html