iteye_15788 2010-06-02 10:47
浏览 174
已采纳

spring3.0报如何错误,是啥问题呢,超郁闷

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'authentication-provider'. One of '{"http://www.springframework.org/schema/security":authentication-provider, "http://www.springframework.org/schema/security":ldap-authentication-provider}' is expected.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [na:1.6.0_02]

xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>
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-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"
default-lazy-init="true">

SpringSecurity安全配置

<!-- http安全配置 -->


default-target-url="/" authentication-failure-url="/security/login.action?error=1" />


error-if-maximum-exceeded="false" />
/s:session-management
/s:http







/s:authentication-manager

  • 写回答

1条回答

  • myali88 2010-06-02 10:54
    关注

    [quote]
    [code="java"]
    Invalid content was found starting with element 'authentication-provider'.
    [/code]
    [/quote]
    错误提示了。
    [code="xml"]






    [/code]
    这个设置部分应该加上你声明的xml命名空间吧,就是“s:”

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败