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"