title: Spring configuration beans static resources mapping and url's mapping?
body: <p>I just started with spring framework and i have a problem with my spring beans configurations.
  To load my static resources such as css, js, etc. i had to put the following line:
  <code>&lt;mvc:resources mapping=”/resources/**” location=”/resources/” /&gt;</code> in my spring bean configuration:</p>
  
  <p>My problem is that if i put this line, for some reason all url's of my application are not mapped when i deploy my application. When i comment this line all the url's application are working just fine, but of course my static resources are not mapped.</p>
  
  <p>I need some tips on how should i tackle this problem. Thank you !.
  Also this is all my spring-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:p="http://www.springframework.org/schema/p"  
      xmlns:context="http://www.springframework.org/schema/context" 
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="
          http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
          http://www.springframework.org/schema/context 
          http://www.springframework.org/schema/context/spring-context-4.0.xsd 
          http://www.springframework.org/schema/mvc 
          http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"&gt;
  
  
      &lt;context:component-scan base-package="com.application" /&gt;
      &lt;!-- Mapping the static resources --&gt;
       &lt;mvc:resources mapping="/resources/**" location="/resources/" /&gt;
  
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView" /&gt;
          &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
      &lt;!-- Unimportant for my problem --&gt;
      &lt;!-- Bean used for login from userDao(repository) --&gt;
      &lt;bean id="customUserDetailsService" class="com.application.service.CustomUserDetailsService"&gt;&lt;/bean&gt;
  
      &lt;!-- Setup the userDao(repository) --&gt;
      &lt;bean id="userDao" class="com.application.model.UserDAO" /&gt;
  
      &lt;!-- Declared datasource bean --&gt;
      &lt;bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
          &lt;property name="url" value="jdbc:mysql://localhost/licenta" /&gt;
          &lt;property name="username" value="root" /&gt;
          &lt;property name="password" value="" /&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>