简体   繁体   English

Spring:-cvc-elt.1:找不到元素“ beans”的声明

[英]Spring :- cvc-elt.1: Cannot find the declaration of element 'beans'

I am new in spring framework and i am trying to learn the spring framework. 我是spring框架的新手,正在尝试学习spring框架。

I am gettings the " cvc-elt.1: Cannot find the declaration of element 'beans'." 我正在获取“ cvc-elt.1:找不到元素'beans'的声明。” error when i run my application. 我运行我的应用程序时出错。

I have tried so my solution from stack overflow. 我已经尝试过,所以我的解决方案来自堆栈溢出。 but non of them worked from me. 但没有一个是我的工作。

This is my servlet-dispacture 这是我的servlet展示

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:mvc="http://www.springframework.org/schema.mvc" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans.4.3.xsd
        http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc.4.3.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.4.3.xsd">
    <context:component-scan base-package="com.spring.umesh" />
    <mvc:annotation-driven />
    <bean id="abc"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix">
            <value>/WEB-INF/</value>
        </property>
        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean>
</beans> 

I am using the meven dependency. 我正在使用meven依赖。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>SpringMVCTutorials</groupId>
    <artifactId>SpringMVCTutorials</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <warSourceDirectory>WebContent</warSourceDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.3.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>4.3.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.3.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.3.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.3.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>
</project>

Please help me. 请帮我。

The following XSD URLs are wrong and don't exist: 以下XSD URL是错误的,并且不存在:

http://www.springframework.org/schema/beans/spring-beans.4.3.xsd
http://www.springframework.org/schema/mvc/spring-mvc.4.3.xsd
http://www.springframework.org/schema/context/spring-context.4.3.xsd"

Try to correct them to be either 尝试将其改正为

http://www.springframework.org/schema/beans/spring-beans-4.3.xsd

or version less (that is better) 或版本较少(更好)

http://www.springframework.org/schema/beans/spring-beans.xsd

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:cvc-elt.1:找不到元素“beans”的声明 - Error: cvc-elt.1: Cannot find the declaration of element 'beans' cvc-elt.1:找不到元素“beans”的声明 - cvc-elt.1: Cannot find the declaration of element 'beans' 在Spring应用程序中遇到错误:cvc-elt.1:找不到元素&#39;beans&#39;的声明 - Getting an error in spring application: cvc-elt.1: Cannot find the declaration of element 'beans' Spring cvc-elt.1:找不到元素&#39;beans&#39;的声明和类似的问题 - Spring cvc-elt.1: Cannot find the declaration of element 'beans' and similar problems 使用spring获取错误消息“cvc-elt.1:找不到元素'beans'的声明。” - Getting error message with spring “cvc-elt.1: Cannot find the declaration of element 'beans'.” org.xml.sax.SAXParseException; lineNumber:6; columnNumber:122; cvc-elt.1:找不到元素&#39;beans&#39;的声明 - org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 122; cvc-elt.1: Cannot find the declaration of element 'beans' cvc-elt.1:找不到RootElement的元素声明 - cvc-elt.1: Cannot find the declaration of element for RootElement cvc-elt.1:找不到元素&#39;NewIssue&#39;的声明 - cvc-elt.1: Cannot find the declaration of element 'NewIssue' 使用cvc-elt.1进行xsd验证失败:无法找到元素的声明 - xsd validation fails with cvc-elt.1: Cannot find the declaration of element XML,XSD,cvc-elt.1:找不到元素的声明 - XML, XSD, cvc-elt.1: Cannot find the declaration of element
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM