异常总结"/>
【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】异常总结
发布评论