部署应用时遇到一些报错,总结如下:
1.使用高版本MySQL 时会默认使用SSL,需要在JDBC连接串时明确指定不使用SSH,参数名为 useSSL 。
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/aa?useUnicode=true&characterEncoding=utf-8&useSSL=true
username=test
password=123456
2. 上面的jdbc 串如果是出现在 xml时,有可能会报如下错, 需要将 & 做转义。
The reference to entity “useSSL” must end with the ‘;’ delimiter.
在xml文件中 &符号 需要转义 这个根据 HTML 的转义规则 更改就行 & -> &
于是便解决了