1

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.

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.