resthub / springmvc-router

Adds route mapping capacity to any "Spring MVC based" webapp. Uses playframework.org Router implementation.
http://resthub.github.com/springmvc-router/
Other
167 stars 63 forks source link

Allow to access static arguments. Improve parsing logic for the static arguments #64

Closed soid closed 10 years ago

soid commented 10 years ago

There's an accessor for dynamic arguments in the Router class, but there's no way to access static arguments outside of the router class. It's useful to be able to access the static arguments as well. So this request creates a getter Router#getStaticArgs() similarly to Router#getArgs().

Secondary, now the static arguments must be typed in without any spaces between quotes, commas and colons. For example:

GET   /    FakeController.method(staticArg1:'value',staticArg2:'value')

This pull request allows having spaces between the argument making it less strict and less brittle. E.g.:

GET   /    FakeController.method(staticArg1 : 'value', staticArg2 : 'value')