【Spring Boot】异常总结

编程入门 行业动态 更新时间:2024-10-22 07:29:57

【Spring Boot】<a href=https://www.elefans.com/category/jswz/34/1771210.html style=异常总结"/>

【Spring Boot】异常总结

  • Executing an update/delete query

缘由:Service层没加@Transactional或repository方法没加@Modifying

  • Either use @Param on all parameters except Pageable and Sort typed once, or none at all!

repository中使用了@Param和PageRequest,原因还未找到,通过修改为nativeQuery=true解决。

  • LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.

缘由:spring-boot-starter-web下间接依赖logback-classisc

解决方案:POM排除依赖

<exclusions><exclusion><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId></exclusion>
</exclusions>
  • check the manual that corresponds to your MySQL server version for the right syntax to use near

缘由:一般都是表字段语句使用了Mysql关键字导致的。其他就是使用了不当的语法。

关键字查询:.7/en/keywords.html

解决方案:更换字段。修改查询SQL。

 

 


爱家人,爱生活,爱设计,爱编程,拥抱精彩人生!

更多推荐

【Spring Boot】异常总结

本文发布于:2024-02-05 09:10:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1674025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   Spring   Boot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!