使用SpringBootDataJPA时出现了以下错误
Caused by: java.lang.IllegalArgumentException: Unable to locate Attribute with the the given name [categoryType] on this ManagedType[XXX]
原因真是愚蠢,就是实体类和数据库表字段不对应,简单来说,默认的
类里应该是驼峰命名机制的,如何和数据库表对象不上,需要@Column
写上对应的字段名
详情参考了StackOverFlow上的回答
https://stackoverflow.com/questions/21385912/spring-data-query-from-method-doesnt-recognize-column