java - How to debug Spring MVC url mapping? -


I am using Spring MVC3 and there is a problem with url mapping. I have a method

  @Controller public square DocumentController {@RequestMapping (value = "/ docs / students / groups / {courseCategoryType}", method = RequestMethod.GET) public ModelAndView listClassesForPupil (@PathVariable ("CourseCategoryType") last string courseCategoryType) {System.err.print ("\ n \ n \ n \ t \ t --- xxxxx --- \ n \ n \ n"); }}   

I'm trying to use, and I know that's being mapped because I'm looking into the console:

  11: 22: 12,108 information DefaultAnnotationHandlerMapping: 411 - map URL path [/ docs / students / groups / {courseCategoryType}] handler 'documentController' 11: 22: 12,108 information DefaultAnnotationHandlerMapping: 411 - map URL path [/ docs / pupil / classes / {courseCategoryType}. *] handler "document controller" 11: 22: 12,108 information Annoteshnhandlr default mapping: 411- mapped URL path [/ docs / Chhat R / Classes / {Korskarataiti} /] handler 'document controller'   

However, when I URL https file: // localhost / docs / students / classes / academic < I have a 404 error in the / code> browser and I do not see anything printed in the console. I have changed the print out code which throws only one exception, and it does not seem to throw either a peer suggestion how the URL resolution is being done, but there should be a way to see that there was nothing to know about moving forward .

How to debug this? Any suggestions in the form of

For such problems, I would like to start debugging the best " Antwup "feel like'd method getHandler (Acteepisaarlet request) DispatcherServlet of

are each configured in the pattern handler mapping is inspected, if it is responsible for handling your specific request. If your request removes it, you can of course make sure that it is a configuration problem inside the spring reference.

For the types of operators RequestMappingHandlerMapping (or default Annoteshnhandlr mapping , if you are using an older version of the spring), it is generally < Code> Handler Mapping are used by annotation based controller configurations.

In the other case, DispatcherServlet in front of "<" in filtering your requests (such as in your case) also no"

Comments