Spring Boot前后端
在前后端开发中在后端编写业务请求类,将数据库的数据返回到前端中:如下编写Contoller类:
![](https://i-blog.csdnimg.cn/blog_migrate/7a55a986393da3b1bfc211f626c4e895.png)
后面再运行后再浏览器运行时出现如下错误:Error attempting to get column 'name' from result set. Cause: java.sql.SQLDataException: Cannot determine value type from string
![](https://i-blog.csdnimg.cn/blog_migrate/7c0da2ae68d230de7df3f9745af22f4d.png)
大概率是由于后端实现类中对应数据库的实体类类型出错:
后面才发现是实体类中name的类型编写错误:
![](https://i-blog.csdnimg.cn/blog_migrate/93ce54e24d9a8941f0402d88679540a7.png)
改为String类型后,变正常。