报错解决区(会持续更新)

下面是我平时敲代码时遇到的棘手的错,很多不是语法的错都是配置或者工具不熟练的情况犯的错,特别记录

  1. IOException parsing XML document from class path resource [applicationContent.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContent.xml] cannot be opened because it does not exist
    出现这个错,是因为你的配置文件没有放对位置,没有放到根目录下,在eclispe的话就把配置文件位置放到根目录,是idea的话就放到resourcrs目录;
  2. 通配符的匹配很全面, 但无法找到元素 ‘mvc:annotation-driven’ 的声明…
    这个错是因为你的配置文件的命名空间有错或者遗漏,我是在敲mvc配置文件时遇到的,这是我成功改回来的命名空间
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/mvc
           http://www.springframework.org/schema/mvc/spring-mvc.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd">
 </bean>

3.springboot报这个错:
在这里插入图片描述原因就是你的主类那个程序没有放在所有组件的包之外,反正把主类的那个文件放在你的文件结构最外面就行

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值