Mybatis常见运行报错(持续更新...)

报错一:
Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
解决办法:
setting -> Editor -> File Encodings,编码方式都选择UTF-8

报错二:
Cause: java.sql.SQLIntegrityConstraintViolationException: Column 'username' cannot be null
解决办法:
查看是否设置username的值,再查看是否将构建好的 emp对象传入该方法。

你可能感兴趣的:(Mybatis常见运行报错(持续更新...))