执行:@Test
public void testUpdate() {
Person person = personService.getPerson(1);
person.setName("小丽");
personService.update(person);
}
报错:
org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException for SQL [update Person set name=? where id=?]; SQL state [HY000]; error code [1366]; Incorrect string value: '\xE5\xB0\x8F\xE4\xB8\xBD' for column 'name' at row 1; nested exception is java.sql.BatchUpdateException: Incorrect string value: '\xE5\xB0\x8F\xE4\xB8\xBD' for column 'name' at row 1编码都是采用UTF-8 怎么无法插入中文