Viren Pushpanayagam
Viren Pushpanayagam

Reputation: 2497

Spring MVC 3, applicationContext.xml

What's wrong with the below config file. Its the applicationContex.xml give a syntext error.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:security="http://www.springframework.org/schema/security"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/security
          http://www.springframework.org/schema/security/spring-security-3.1.xsd">

        <security:http auto-config='true'>
            <security:intercept-url pattern="/**" access="ROLE_USER" />
        </security:http>
  </beans>

I have added the spring-security-config-3.1.0.RC1.jar and spring-security-web-3.1.0.RC1.jar anything I am missing?

Upvotes: 0

Views: 3003

Answers (1)

nfechner
nfechner

Reputation: 17535

You need to prefix the <http> and <intercept-url> tags with the security namespace:

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

Upvotes: 3

Related Questions