这种的问题 可以排除IDEA 中的代码了 这个是 数据库中的类型编码问题
org.apache.ibatis.exceptions.PersistenceException: Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '欢少' in 'field list' The error may involve com.java.dao.StudentDAOfuse.saveUser-Inline The error occurred while setting parameters SQL: INSERT INTO student(id,name,sex,birthday)values(1,欢少,男,2020-03-04) Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '欢少' in 'field list' 复制代码
点击设计表修改一下 varchar中的编码格式即可正常显示
这里主要是接口中#用法错误了 把$改成#就可以正常访问
org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '欢少' in 'field list' ### The error may involve com.java.dao.StudentDAOfuse.saveUser-Inline ### The error occurred while setting parameters ### SQL: INSERT INTO student(id,name,sex,birthday)values(6,欢少,男,2020-03-04) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '欢少' in 'field list'