2016-10-21 10 views
0

У меня есть приложение Spring MVC, развернутое в WebLogic Server Версия: 12.1.2.0.0. но когда я раскрываю к WL я имею эту проблему:weblogic.application.ModuleException в WLS Версия: 12.1.2.0.0

 weblogic.application.ModuleException: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 68; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'security:global-method-security'.:org.xml.sax.SAXParseException:cvc-complex-type.2.4.c: The mat 
ching wildcard is strict, but no declaration can be found for element 'security:global-method-security'. 

Вот мой applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:mvc="http://www.springframework.org/schema/mvc" 
     xmlns:aop="http://www.springframework.org/schema/aop" 
     xmlns:jee="http://www.springframework.org/schema/jee" 
     xmlns:security="http://www.springframework.org/schema/security" 

     xsi:schemaLocation=" 
     http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
     http://www.springframework.org/schema/aop 
     http://www.springframework.org/schema/aop/spring-aop-2.5.xsd 
     http://www.springframework.org/schema/jee 
     http://www.springframework.org/schema/jee/spring-jee-2.5.xsd 
     http://www.springframework.org/schema/mvc 
     http://www.springframework.org/schema/mvc/spring-mvc.xsd 
     http://www.springframework.org/schema/security 
     http://www.springframework.org/schema/security/spring-security-4.0.xsd"> 


     <security:global-method-security secured-annotations="enabled" /> 

     <security:http auto-config="true"> 
      <security:csrf/>  
      <security:intercept-url pattern="/**" access="permitAll" /> 
     </security:http> 

     <security:authentication-manager/> 

и мой pom.xml

<dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-core</artifactId> 
      <version>4.0.2.RELEASE</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-web</artifactId> 
      <version>4.0.2.RELEASE</version> 
     </dependency> 

ответ

0

Вы должны добавить spring-security-config зависимость ,

<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-config --> 
<dependency> 
    <groupId>org.springframework.security</groupId> 
    <artifactId>spring-security-config</artifactId> 
    <version>4.0.1.RELEASE</version> 
</dependency>