在整合ssm后,使用postMan发送post请求传输JSON数据向表添加数据,结果表中中文部分的数据全为???
原因:jdbc.properties中url有误,将"&"写成了"&" 。"&"
这种写法出现在mybatis的核心配置文件中,其中的"amp;"相当于转义符
jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8
解决方法:将"&"改为"&"
jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8