Reputation: 3221
I have such line in my routes
file:
GET /api/blahblahblah/{aaa}/{bbb}/{ccc} Application.process
And I have a controller Application
with method process
:
public static void process(String aaaParam, String aaaParam, String ccc) { ... }
So I access the controller this way: http://localhost:9000/api/blahblahblah/one/two/three
The problem is that inside this method only ccc
parameter has it's value ("three" in this case), aaa
and bbb
always are null
.
Upvotes: 1
Views: 176
Reputation: 3221
Well, my bad. I've figured out the reason of NPE by myself. The thing is that method params names should exactly match the routes params names: parameters don't correspond by order (as I thought), but by name.
Upvotes: 2