Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/380.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java spring gwt找不到元素“bean”的声明_Java_Xml_Spring_Gwt - Fatal编程技术网

Java spring gwt找不到元素“bean”的声明

Java spring gwt找不到元素“bean”的声明,java,xml,spring,gwt,Java,Xml,Spring,Gwt,当我试图开始时,我遇到了一个异常 <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:context="http://www.springframework.org/schema/context" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http

当我试图开始时,我遇到了一个异常

<beans:beans xmlns="http://www.springframework.org/schema/security"
             xmlns:context="http://www.springframework.org/schema/context"
             xmlns:beans="http://www.springframework.org/schema/beans" 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.2.1.xsd
                        http://www.springframework.org/schema/security
                        http://www.springframework.org/schema/security/spring-security-3.2.4.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-4.2.1.xsd"
        >


    <http auto-config="true">
        <intercept-url pattern="/securegwt/**" access="ROLE_USER" />
        <intercept-url pattern="/gwt/**" access="ROLE_USER" />
        <intercept-url pattern="/**/*.html" access="ROLE_USER" />
        <intercept-url pattern="/BuyerSide.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </http>

    <beans:bean id="customAuthenticationProvider"
                class="project.server.security.CustomAuthenticationProvider" />

    <authentication-manager alias="authenticationManager">
        <authentication-provider ref="customAuthenticationProvider" />
    </authentication-manager>

    <context:component-scan base-package="project"/>

</beans:beans>

您的XML标头引用了一些无效的XSD。更改此项:

<beans:beans xmlns="http://www.springframework.org/schema/security"
             xmlns:context="http://www.springframework.org/schema/context"
             xmlns:beans="http://www.springframework.org/schema/beans" 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.2.1.xsd
                        http://www.springframework.org/schema/security
                        http://www.springframework.org/schema/security/spring-security-3.2.4.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-4.2.1.xsd"
        >


    <http auto-config="true">
        <intercept-url pattern="/securegwt/**" access="ROLE_USER" />
        <intercept-url pattern="/gwt/**" access="ROLE_USER" />
        <intercept-url pattern="/**/*.html" access="ROLE_USER" />
        <intercept-url pattern="/BuyerSide.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </http>

    <beans:bean id="customAuthenticationProvider"
                class="project.server.security.CustomAuthenticationProvider" />

    <authentication-manager alias="authenticationManager">
        <authentication-provider ref="customAuthenticationProvider" />
    </authentication-manager>

    <context:component-scan base-package="project"/>

</beans:beans>
xsi:schemaLocation="
                    http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans-4.2.1.xsd
                    http://www.springframework.org/schema/security
                    http://www.springframework.org/schema/security/spring-security-3.2.4.xsd
                    http://www.springframework.org/schema/context
                    http://www.springframework.org/schema/context/spring-context-4.2.1.xsd"
为此:

<beans:beans xmlns="http://www.springframework.org/schema/security"
             xmlns:context="http://www.springframework.org/schema/context"
             xmlns:beans="http://www.springframework.org/schema/beans" 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.2.1.xsd
                        http://www.springframework.org/schema/security
                        http://www.springframework.org/schema/security/spring-security-3.2.4.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-4.2.1.xsd"
        >


    <http auto-config="true">
        <intercept-url pattern="/securegwt/**" access="ROLE_USER" />
        <intercept-url pattern="/gwt/**" access="ROLE_USER" />
        <intercept-url pattern="/**/*.html" access="ROLE_USER" />
        <intercept-url pattern="/BuyerSide.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </http>

    <beans:bean id="customAuthenticationProvider"
                class="project.server.security.CustomAuthenticationProvider" />

    <authentication-manager alias="authenticationManager">
        <authentication-provider ref="customAuthenticationProvider" />
    </authentication-manager>

    <context:component-scan base-package="project"/>

</beans:beans>
xsi:schemaLocation="
                    http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                    http://www.springframework.org/schema/security
                    http://www.springframework.org/schema/security/spring-security-3.2.xsd
                    http://www.springframework.org/schema/context
                    http://www.springframework.org/schema/context/spring-context-4.2.xsd"