spring错误集

1. Mapper.xml中的SQL语句错误导致的

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'deletes from mybatis.user where id=5' at line 1

deletes from mybatis.user where id=#{id}; 错误
delete from mybatis.user where id=#{id};

<delete id="deleteUser" parameterType="int">
   delete from mybatis.user where id=#{
   id};
</delete>

2. java.io.IOException: Could not find resource mybatis-config.xml

异常:

java.io.IOException: Could not find resource mybatis-config.xml

解决:

<build>
   <resources>
         <resource>
             <directory>src/main/java</directory>
             <includes>
                 <include>**/*.properties</include>
                 <include>**/*.xml</include>
             </includes>
          
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SpringCloud教程是一系列关于Spring Cloud框架的视频教程,包括了Spring Cloud 2020.0.x版本教程、Spring Cloud Alibaba教程、Greenwich版本教程等等。\[1\]这些教程涵盖了使用Nacos作为注册中心和配置中心、使用Spring Cloud Gateway作为服务网关、使用Sentinel作为熔断器、使用Spring Cloud Sleuth+Zipkin实现链路追踪等内容。如果你遇到了一些问题,比如依赖问题或者注入Feign接口的问题,可以通过查看错误信息来找到解决方法。例如,如果你遇到了类似"ServerPropertiesAutoConfiguration.class cannot be opened because it does not exist"的报错,可能是因为依赖有问题,你可以尝试使用spring-cloud-starter-netflix-hystrix替代spring-cloud-starter-hystrix来解决这个问题。\[3\]另外,如果你在注入Feign接口时提示"There is more than one beans of 'UserFeign' type"的错误,可能是IDEA工具中Spring插件的问题,你可以通过修改插件的设置来解决这个问题。\[3\]如果你遇到了其他问题,可以参考相关的教程或者在社区中寻求帮助。 #### 引用[.reference_title] - *1* [史上最简单的 SpringCloud 教程 | 终章](https://blog.csdn.net/forezp/article/details/70148833)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [SpringCloud 详细教程](https://blog.csdn.net/qq_25894385/article/details/109613402)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [SpringCloud入门教程(全)](https://blog.csdn.net/tttalk/article/details/122686591)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值