小编zoo*_*oop的帖子

Spring框架工作配置问题"元素上下文的前缀上下文:annotation-config未绑定"

我有一个奇怪的问题,我似乎无法追查.我有这个与其他服务器一起工作没有问题,但我似乎无法让这个服务器工作.我看到的最接近我的问题的帖子是这篇文章元素"context:component-scan"的前缀"context"没有绑定

所有其他人真的只是因为前缀不在xml文件中.我希望有人能够在这里指出我正确的方向.

Spring XML文件:

<?xml version="1.0" encoding="UTF-8"?>
<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"
  xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
  xmlns:mongo="http://www.springframework.org/schema/data/mongo"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-3.0.xsd
   http://www.springframework.org/schema/data/mongo
    http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
    http://www.directwebremoting.org/schema/spring-dwr
    http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">

    <context:annotation-config/>
Run Code Online (Sandbox Code Playgroud)

所以我有,但得到这个错误:

org.xml.sax.SAXParseException: The prefix "context" for element "context:annotation-config" is not bound.
Run Code Online (Sandbox Code Playgroud)

感谢任何帮助.让我知道我还能提供什么.

谢谢

java xml spring

8
推荐指数
3
解决办法
2万
查看次数

标签 统计

java ×1

spring ×1

xml ×1