title: How to use intercept-url pattern and access?
body: <p>I am using Spring security but i don't understand very well how intercept-url works. Here is my spring security config file :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
  http://www.springframework.org/schema/security
  http://www.springframework.org/schema/security/spring-security-3.2.xsd
  http://www.springframework.org/schema/jdbc
  http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd"&gt;
  
      &lt;!-- configuration des urls  --&gt;
      &lt;security:http auto-config="true"&gt;
          &lt;security:intercept-url pattern="/*" access="ROLE_USER" /&gt;
          &lt;security:form-login/&gt;
      &lt;/security:http&gt;
  
  
      &lt;security:authentication-manager alias="authenticationManager"&gt;
          &lt;security:authentication-provider ref="authenticationProvider" /&gt;
      &lt;/security:authentication-manager&gt;
  
      &lt;bean id="authenticationProvider"
         class="org.springframework.security.authentication.dao.DaoAuthenticationProvider"&gt;
          &lt;property name="userDetailsService" ref="userDetailsService" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="userDetailsService"
          class="com.nexthome.app.security.UserDetailsServiceImpl" /&gt;
  
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>With this configuration, i cannot access without being authenticated. So when accessing the url <code>http://localhost:8080/nexthome</code> displays a spring login form (<code>http://localhost:8080/nexthome/spring_security_login</code>).
  But when i change the  to . I am able to access to <code>http://localhost:8080/nexthome/user/login</code> without login. </p>
  
  <p>My aim is to protected some url :</p>
  
  <pre><code>http://localhost:8080/nexthome  all people must access
  http://localhost:8080/nexthome/login  all people must access ( how to display spring login form when trying to access the url?)
  http://localhost:8080/nexthome/logout  access to ROLE_USER and ROLE_ADMIN
  </code></pre>
  
  <p>Thanks for your help</p>