目前我遇到了为我的获取mysql数据的问题 springboot </跨度> 项目:
出现意外错误(type = Internal Server Error,status = 500)。无法提取ResultSet; SQL [n / a锟]; }
@RequestMapping( “/测试/欢迎”) public String welcome(){
回来“欢迎来到 springboot </跨度> “;
}
编辑:application.properties
cloud.aws.region.auto =真cloud.aws.region.static = us-east-2锟
在您的实体类即TestEntity.java中,您需要指定您引用的表
@Entity @Table(name="tbl_something") public class TestEntity implements Serializable {
并且使用CrudRepository可以用于过多的数据库。 application.properties文件对我来说很好看。
通过将表重命名为全部小写字符,我找到了解决问题的方法( test_table )在SQL中然后使用该表而不是 Test_table Springboot能够找到该表并将其链接映射到我的实体类。我不知道它为什么会这样。也许与我正在使用的Netbeans IDE有关?
test_table
Test_table