关于Spring config.properties的报错解决方案

来源:互联网 发布:破解软件网站大全 编辑:程序博客网 时间:2024/06/06 15:53

报错1The connection property 'useUnicode' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true;characterEncoding=utf-8' is not in this set  

<property name="url">
<value>jdbc:mysql://localhost:3306/cims?useUnicode=true&amp;characterEncoding=utf-8</value>
</property>

注意参数之间用&amp隔开,而不是&

报错2:
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

此时就应该检查jdbc的url有没有写错,比如端口啥的
0 0
原创粉丝点击