Fork me on GitHub

Mybatis-no getter for property named 'col_name' in 'class com.xxx.onebean'

Mybatis中出现该异常

There is no getter for property named 'col_name' in 'class com.xxx.onebean

意思是onebean这个实体中没有变量col_name的getter方法。这种情况可能使:

1.真的没有加getter方法

2.entityMapper.xml中应该使用#{实体类变量名},而不是#{数据库列名}。

posted @ 2018-02-12 14:33  秋夜雨巷  阅读(260)  评论(0编辑  收藏  举报