应用程序未使用user_id列,并且表的用户表中也没有user_id,但收到错误o.h.engine.jdbc.spi.SqlExceptionHelper:列名user_id无效。
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.orm.jpa.JpaSystemException: Unable to find column position by name: user_id] with root cause
刀接口
@Query(value="Select * from Users u WHERE u.UserName=:username", nativeQuery = true)
User findByUsername(@Param("username") String username) throws SQLException;
表格数据
用户模型类
请帮帮忙
1条答案
按热度按时间gmxoilav1#
对此有多个修复程序
我们必须为每列注解@column
并且必须使用www.example.com上的以下属性application.properties
而且我们还必须使用大小写混合的列名称和连字符
提供对我有帮助的帖子的链接@列和属性
混合大小写的列名称