0

I wanted to exclude my resources from not going to the page's controllers. Spring is mentioning to use; (Spring version I'm running on is: 3.2.0.RELASE)

<beans xmlns:mvc="http://www.springframework.org/schema/mvc" 
       xmlns:schemaLocation="http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

<!-- Add BeanNameUrlHandlerMapping 
http://stackoverflow.com/questions/4784060/spring-tomcat-and-static-resources-and-mvcresources -->

<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />

<mvc:resources mapping="/assets/**" location="/assets/" />

But now all information is being blocked, no information is passed further to my beans(/controllers)

Any suggestions?

jarnohenneman
  • 963
  • 10
  • 21
  • You might be missing `` configuration. When you start configuring handler mappings manually, spring will turn off its defaults. – Pavel Horal Jan 20 '15 at 07:33
  • On a second check - do you really use `BeanNameUrlHandlerMapping`? Ok... I need to go through the linked SO question. Seems quite strange. – Pavel Horal Jan 20 '15 at 07:34
  • What kind of [`HandlerAdapter`](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/HandlerAdapter.html) are you using in your application (how do your controllers look like)? – Pavel Horal Jan 20 '15 at 07:38

1 Answers1

0

I think you would be missing below line in spring configuration file.

    <mvc:annotation-driven/>
    <mvc:default-servlet-handler/>
dReAmEr
  • 6,986
  • 7
  • 36
  • 63