You're missing the point here. I never use a * in my URL. The * is only used as a wildcard for the Jetty server.
Eg: /users/* maps /users/1, users/2, users/n, users/84295494334349, users/qjfmoijcmoiqzjmoeqjmo, etc
If I would follow your logic, I would as much handlers as there are combinations in my database. The API would take a lot of time starting up, and everytime a new database record is created, a new handler would be needed. That's not the way to go, and that's why we use a ¨* as wildcard. a * can be replaced with everything in the URL, it's not meant to be a literal * like in that stackexchange question.
I do understand this!
but it came to my mind that the problem I have is not really a problem.
/users/* also maps /users/3/transactions/4, so I can just get the url with .RequestURI, split it and find out that I need to go to the transaction class with the user id as parameter.