1
我在導入spring-security-OAuth2的源代碼時遇到此問題。我對XML不太瞭解。oauth2:custom-grant
錯誤代碼是
<oauth2:authorization-server client-details-service-ref="clientDetails">
<oauth2:authorization-code />
<oauth2:custom-grant token-granter-ref="tokenGranter" />
</oauth2:authorization-server>
它報道
cvc-complex-type.2.4.a: Invalid content was found starting with element 'oauth2:custom-grant'. One of '{"http://www.springframework.org/schema/security/oauth2":implicit, "http:// www.springframework.org/schema/security/oauth2":refresh-token, "http://www.springframework.org/schema/security/oauth2":client-credentials, "http://www.springframework.org/schema/ security/oauth2":password}' is expected.