您好,我正在使用 Maven、Eclipse、Tomcat 构建 Web 应用程序。 解决我的依赖关系后,我收到此错误。谁能帮忙解决这个问题吗?
cvc-complex-type.2.4.a: Invalid content was found starting with element 'http:basicAuthSupplier'.One of '{"http://cxf.apache.org/transports/http/configuration":client, "http://cxf.apache.org/transports/http/configuration":authorization, "http://cxf.apache.org/transports/http/configuration":proxyAuthorization,"http://cxf.apache.org/transports/http/configuration":tlsClientParameters, "http://cxf.apache.org/transports/http/configuration":authSupplier, "http://cxf.apache.org/transports/http/configuration":trustDecider}' is expected. jaxws-web-context.xml
这是出现此错误的代码:
<http:conduit name="*.http-conduit">
<http:basicAuthSupplier class="org.skyway.spring.util.webservice.cxf.HttpBasicAuthenticationSupplier" />
</http:conduit>
最佳答案
错误消息列出了所有允许的 XML 元素。
正如您在列表中看到的,没有前缀 basicAuthSupplier
。尝试使用 authSupplier
代替:
<http:authSupplier class="org.skyway.spring.util.webservice.cxf.HttpBasicAuthenticationSupplier" />
相关:
关于java - "Invalid content was found starting with element ' http :basicAuthSupplier '" while building Apache CXF project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18527146/