The database connection URL that was previously configured in the Pom file, many configurations are written in the Pom file causing the configuration file to be too long
The new project writes the configuration to a different folder in the properties file.
Db.url directly copied in the Pom file.
Jdbc:mysql://127.0.0.1:3306/portal?useunicode=true&characterencoding=utf-8& Autoreconnect=true
Then the testcase test insert has been garbled.
View database character Set all OK
Another project data insertion is OK, can confirm the new project configuration problem.
On the Internet to find the results are said in the Db.url with character set parameters, I also bring or not.
Think of the most direct way is to fall back to the same configuration as the previous project, incredibly Chinese inserted normal, so you can confirm that the configuration is a problem.
Guess before you look.
XML inside Useunicode=true&characterencoding=utf-8&autoreconnect=true connector is "& amp; "
Java file in the "&", is not mentioned in the properties file the connector
Test with "&" To do the connector, testcase Insert, OK, garbled solution!
SPRINGMVC + mybatis + Druid Insert database Chinese garbled, query no garbled