搭建springboot项目出现Whitelabel Error Page,type=Internal Server Error, status=500问题解决方法

浏览器提示错误

"Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Mar 21 12:43:37 CST 2022
There was an unexpected error (type=Internal Server Error, status=500)."

-----------500是指后端执行异常,查看后端错误提示:

" Error attempting to get column 'username' from result set.  Cause: java.sql.SQLDataException: Cannot determine value type from string 'admin'
; Cannot determine value type from string 'admin'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'admin'] with root cause"

---------------username处代码前的字符串类型错误

--------------解决方法

private Integer username; 改为 private String username;

原来是我打代码时候忘记修改字符串类型了。。。

修改之前页面:

修改之后 页面


版权声明:本文为qq_56740869原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。