I'm using NinjaFramework 6.0, tried adding a 10th @Param to my controller method and now I get "No suitable method found for with(Controller[...]Index)" error compiling the Routes.java.
My method looks like this:
public Result personIndex(
@Param("ssn") Optional<String> ssn,
@Param("dodId") Optional<String> dodId,
@Param("firstName") Optional<String> firstName,
@Param("middleName") Optional<String> middleName,
@Param("lastName") Optional<String> lastName,
@Param("birthday") Optional<String> birthday,
@Param("branch") Optional<String> branch,
@Param("rateRank") Optional<String> rateRank,
@Param("status") Optional<String> status,
@Param("page") Optional<Integer> page) { ... }
If I remove one of the params then everything will compile and work. Is this a hard limit? Should I encapuslate these into some sort of form / dto object?
--
This appears to be a problem when using this type of Route configuration:
router.GET().route("/persons").with(PersonController::personIndex);
If I switch to the 'old' way it works fine:
router.GET().route("/persons").with(PersonController.class, "personIndex");
While browsing Ninja docs (http://www.ninjaframework.org/documentation/basic_concepts/routing.html), I noticed the following text
Not sure if something changed from 6.0 version, but 10 params should work.