SSM框架整合中遇到的问题汇总

时间:2021-06-20 22:15:25

1 MySQL在高版本需要指明是否进行SSL连接问题
警告:Mon Sep 05 21:27:51 GMT+08:00 2016 WARN: Establishing SSL CONNECTION without SERVER’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. FOR compliance WITH existing applications NOT USING SSL the verifyServerCertificate property IS SET TO ‘false’.

You need either TO explicitly DISABLE SSL BY setting useSSL=FALSE, OR SET useSSL=TRUE AND provide truststore FOR SERVER certificate verification.

解决方式:修改.xml文件的JDBC连接字符串:

value="jdbc:mysql://localhost:3306/library?useUnicode=true&characterEncoding=utf8&useSSL=false"

连接字符串既不能用‘&’也不能用‘;’而是要使用‘& amp’。虽然&amp 本身表示‘&’符号,但是必须这么写才可以,否则解析xml文件时就无法解析。