본문 바로가기

에러

설정파일.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:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
              http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd
              http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">    '

위와 같이 상단에 설정되는 부분을 유심히 살펴보면 자신이 뭔가 빼먹어서 설정태그에 에러가 나있을 수 있다.


나 같은 경우는


xmlns:security="http://www.springframework.org/schema/security"


이부분을 빼먹어서


<security:global-method-security proxy-target-class="true" secured-annotations="enabled" pre-post-annotations="enabled" jsr250-annotations="enabled" />


시큐리티 어노테이션을 설정해주는 부분에서 에러가 생겨 삽질을 계속했다.


출처 : http://stackoverflow.com/questions/10372649/error-the-prefix-security-for-element-securityauthentication-provider-is-n


===============================================================================================================================================


cvc-complex-type.2.4.c 뭐시기 에러가 났을 경우


<bean 뭐시기>

<property 뭐시기>

</bean>


로 정의 되어있는 부분을


<beans:bean 뭐시기>

<beans:property 뭐시기>

<beans:bean>


으로 바꾸니 해결됨.


<bean>과 <beans:bean>의 차이가 뭔지 알아야함..