MyBatis实体类属性与表字段不一致的4种解决方案
pom的依赖配置: 1 < dependencies > 2 < dependency > 3 < groupId > org.mybatis </ groupId > 4 < artifactId > mybatis </ artifactId > 5 < version > 3.4.5 </ version > 6 </ dependency > 7 < dependency > 8 < groupId > junit </ groupId > 9 < artifactId > junit </ artifactId > 10 < version > 4.12 </ version > 11 </ dependency > 12 < dependency > 13 < groupId > mysql </ groupId > 14 < artifactId > mysql-connector-java </ artifactId > 15 < version > 8.0.17 </ version > 16 </ dependency > 17 </ dependencies > MySQL数据库的建表语句: 1 CREATE TABLE `tb_user` ( 2 `id` int ( 11 ) NOT NULL AUTO_INCREMENT, 3 `username`