<xs:element name="jdbc-user-service" substitutionGroup="security:any-user-service">
<xs:annotation> .. etc </xs:annotation>
<xs:complexType>
<xs:attribute name="id" type="xs:token"></xs:attribute>
<xs:attributeGroup ref="security:jdbc-user-service.attlist"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="jdbc-user-service.attlist">
<xs:attribute name="data-source-ref" use="required" type="xs:token">
</xs:attribute>
<xs:attribute name="cache-ref" type="xs:token">
</xs:attribute>
<xs:attribute name="users-by-username-query" type="xs:token">
</xs:attribute>
<xs:attribute name="authorities-by-username-query" type="xs:token">
</xs:attribute>
<xs:attribute name="group-authorities-by-username-query" type="xs:token">
</xs:attribute>
<xs:attribute name="role-prefix" type="xs:token">
</xs:attribute>
</xs:attributeGroup>
那么为什么eclipse给我这个错误
cvc-complex-type.2.4.a:发现以元素“jdbc-user-service”开头的无效内容。'{"http://www.springframework.org/schema/security":user}' 之一是预期的。
当我提供以下 XML 时?
<jdbc-user-service
data-source-ref="dataSource"
users-by-username-query="SELECT u.uname, u.upwd, u.enabled FROM ucsdb.users u WHERE u.uname = ?"/>