解决问题:通配符的匹配很全面, 但无法找到元素 ‘context:component-scan‘ 的声明~

简介: 解决问题:通配符的匹配很全面, 但无法找到元素 ‘context:component-scan‘ 的声明~

异常描述如下:

产生异常原因:

因为在配置文件中没有找到<context:component-scan />元素的声明,解决办法:将XML配置文件中的声明改为下述代码:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       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/context http://www.springframework.org/schema/context/spring-context.xsd">
相关文章
|
开发工具 数据安全/隐私保护 git
Git报错 Incorrect username or password (access token) 的解决方式
Git报错 Incorrect username or password (access token) 的解决方式
4564 0
Git报错 Incorrect username or password (access token) 的解决方式
|
Java API
JDK API文档中文版(1.6、1.8、1.9)(附百度网盘下载地址)
JDK API文档中文版(1.6、1.8、1.9)(附百度网盘下载地址)
11792 4
JDK API文档中文版(1.6、1.8、1.9)(附百度网盘下载地址)
【面试题精讲】Java静态方法为什么不能调用非静态成员?
【面试题精讲】Java静态方法为什么不能调用非静态成员?
|
IDE Java 数据库连接
解决Java环境中无法识别org.mybatis.spring.annotation.MapperScan的问题。
祝你好运,在这场MyBatis的魔法冒险中获得胜利!记住,魔法书(官方文档)永远是你最好的朋友。
1165 18
|
Java Maven 开发工具
maven导入项目出现Unable to import maven project: See logs for details
maven导入项目出现Unable to import maven project: See logs for details
661 0
maven导入项目出现Unable to import maven project: See logs for details
|
Java 数据库连接 mybatis
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
992 1
|
SQL 开发框架 安全
Web安全-IIS短文件名泄露
Web安全-IIS短文件名泄露
1930 2
|
存储 Linux
【linux】【系统】启动参数配置的示例
【linux】【系统】启动参数配置的示例
609 0
|
Java 应用服务中间件 程序员
Servlet的使用与部署
Servlet的使用与部署
336 2