随笔分类 - 计算机与程序 / SpringBoot
SpringBoot相关笔记与问题解决
摘要:java原生SQL @Query进行插入操作出错,java.sql.SQLException: Can not issue data manipulation statements with executeQuery(). ——墨问苍生 在做一个接口的时候,数据库插入出现错误 关键代码如下: 1 p
阅读全文
摘要:通过jpa向数据库插入数据 ——墨问苍生 https://www.cnblogs.com/gudulijia/p/6911682.html 参考本篇博客 Dao层数据接口: Controller层数据库操作: Dao.save(bean);
阅读全文
摘要:spring-data-jpa报错-No property ... found for ... Did you mean ——墨问苍生 spring-data 按照接口方法定义的名字(默认认为是驼峰写法) spring-data 规范要求dao中的findBy***,必须和实体字段名称一致 例如fi
阅读全文
摘要:JPA 映射到 MySql 的 text 类型 ——墨问苍生 创建一个Bean jpa如果直接映射mysql的text/longtext/tinytext类型到String字段会报错。需要设置一下@Lob和@Column。 @Lob代表是长字段类型,默认的话,是longtext类型,所以需要下面这个
阅读全文
摘要:SpringBoot-异常 只执行了init(),不执行doGet和doPost ——墨问苍生 问题发现: 只执行了init()但是无法执行doGet和doPost 排查后发现Service方法没有继承父类 问题解决:
阅读全文
SpringBoot报错-Could not create connection to database server. Attempted reconnect 3 times. Giving up.
摘要:SpringBoot报错-Could not create connection to database server. Attempted reconnect 3 times. Giving up. ——墨问苍生 无法连接数据库,一开始以为是yml的配置有问题,反复检查后发现是pom.xml文件的
阅读全文
摘要:SpringBoot警告-springboot2.0 hikaricp - failed to valid... no operations allowed after connection closed. ——墨问苍生 1 2020-01-13 14:26:58.733 WARN 15263 [h
阅读全文

浙公网安备 33010602011771号