Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml Spring配置:找不到springframework.org/schema/security_Spring_Spring Boot_Gradle_Spring Security_Xml Configuration - Fatal编程技术网

Xml Spring配置:找不到springframework.org/schema/security

Xml Spring配置:找不到springframework.org/schema/security,spring,spring-boot,gradle,spring-security,xml-configuration,Spring,Spring Boot,Gradle,Spring Security,Xml Configuration,我有一个xml配置,当我尝试导入spring安全命名空间时,它给了我两个选择:springframework.org/schema/p和springframework.org/schema/c。我需要的是:(找不到)。这是一个spring启动项目,我需要用xml配置安全性。我想我失去了一些依赖,但我不确定是哪一个 这是xml配置文件: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http:

我有一个xml配置,当我尝试导入spring安全命名空间时,它给了我两个选择:
springframework.org/schema/p
springframework.org/schema/c
。我需要的是:(找不到)。这是一个spring启动项目,我需要用xml配置安全性。我想我失去了一些依赖,但我不确定是哪一个

这是xml配置文件:

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"

   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop.xsd"

    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security.xsd">

您缺少xml文件顶部的spring security命名空间链接,并且在底部的模式链接中有一个额外的引号。尝试将以下内容添加到xml文件,如下所示:

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:security="http://www.springframework.org/schema/security"

   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security.xsd">    
</beans>


非常感谢您,先生,我真不敢相信我错过了这样的机会。没问题,莱西,很高兴我能帮上忙。
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:security="http://www.springframework.org/schema/security"

   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security.xsd">    
</beans>