Currently this is not possible to do :
RouterService.RouteBuilder routerBuilder = new RouterService.RouteBuilder();
routerBuilder //
.any("/", new RootResource() //
.any("/myResource", new MyResource() //
.any("/*", new Default());
router = routerBuilder.build();
If you do that RootResource will never be called.
I think this is because / and /* will create 2 RequestMatcher which will be considered as equal and so Default will override RootResource in handlers hashmap.
Maybe the solution is to add isPrefixed attribute to equals() and hashcode() methods ?
(triggered by #27 (comment))
Currently this is not possible to do :
If you do that
RootResourcewill never be called.I think this is because
/and/*will create 2RequestMatcherwhich will be considered as equal and soDefaultwill overrideRootResourcein handlers hashmap.Maybe the solution is to add
isPrefixedattribute toequals()andhashcode()methods ?(triggered by #27 (comment))