报错信息:
org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column 'user_photo' from result set. Cause: java.sql.SQLException: Error
; uncategorized SQLException; SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89)
; uncategorized SQLException; SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89)
解决办法
在对应的实体类上加上两个注解
//@Data 生成getter,setter ,toString等函数
//@NoArgsConstructor 生成无参构造函数
//@AllArgsConstructor //生成全参数构造函数