我正在尝试实现OAuth2服务器,该服务器将对客户端进行身份验证并通过令牌对其进行授权 . 但是在使用此架构时我遇到了编译错误 .

问题:它显示错误

“cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素'oauth:client'的声明”

Plz的帮助 .

我关注https://www.javacodegeeks.com/2012/02/oauth-with-spring-security.html

`http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd“>

<!-- Root Context: defines shared resources visible to all other web components -->

<http auto-config='true'>
    <intercept-url pattern="/**" access="ROLE_USER" />
</http>

<authentication-manager>
    <authentication-provider>
        <user-service>
            <user name="jimi" password="jimi" authorities="ROLE_USER" />
        </user-service>
    </authentication-provider>
</authentication-manager>

<!--apply the oauth client context -->
<oauth:client token-services-ref="oauth2TokenServices" />

<beans:bean id="oauth2TokenServices"
    class="org.springframework.security.oauth2.consumer.token.InMemoryOAuth2ClientTokenServices" />

<oauth:resource id="cv" type="authorization_code"
    clientId="foo" accessTokenUri="http://localhost:8080/cv/oauth/authorize"
    userAuthorizationUri="http://localhost:8080/cv/oauth/user/authorize" />


 <beans:bean id="cvService" class="org.springsource.oauth.CVServiceImpl">
    <beans:property name="cvURL" value="http://localhost:8080/cv/cvs"></beans:property>
    <beans:property name="cvRestTemplate">
        <beans:bean class="org.springframework.security.oauth2.consumer.OAuth2RestTemplate">
            <beans:constructor-arg ref="cv"/>
        </beans:bean>
    </beans:property>
    <beans:property name="tokenServices" ref="oauth2TokenServices"></beans:property>
 </beans:bean>

`