This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

The meaning of the last RequestMapping is to have a "catch-all" handler, so that if no /api/** path match a defined one, I will get in that "deafult" handler.

Code:

/api/board/1

gets correctly dispatched.

Code:

/api/board/1/entries/20/0

instead, goes in the "default" handler.

I'm aware that I can configure a defaultHandler property in the HandlerMapping, but still I would like to know why Spring thinks that /** is more specific than /api/board/{boardId}/entries/{limit}/{offset}