Xml Spring配置:找不到springframework.org/schema/security
我有一个xml配置,当我尝试导入spring安全命名空间时,它给了我两个选择: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:
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>