-
Jan 6th, 2013, 04:25 PM
#1
Spring Namespace error in security.xml
Hi All,
I am new to Spring 3. I don't know how to fix this namespace error in Spring security.xml.
Actually I am tying to add profile code around a bean, so whenever I add
<beans:beans profile="dev">
around any bean, it throws the following error: Multiple annotations found at this line: - cvc-complex-type.2.4.a: Invalid content was found starting with element 'context:component-scan'. One of '{"http://www.springframework.org/schema/beans":beans}' is expected. - advised by org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(org.aopalliance.intercept. MethodInvocation)
Here is the code of .xml :
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schem...ontext-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<beans:beans profile="dev"> ( This is code that generates error)
<beans:bean id="loggerListener" class="org.springframework.security.authentication .event.LoggerListener"/>
</beans:bean>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules