{title:'Java Method Parameters', updated:'9.0.0'}

Java methods can contain any of the following parameters in any order:

In Spring Boot environments, any available Spring Beans can also be passed in as parameters.

Example:

| @RestGet("/example1/{a1}/{a2}/{a3}/*") | public String doGetExample1( | RestRequest req, | RestResponse res, | @Method String method, | @Path("a1") String a1, | @Path("a2") int a2, | @Path("a3") UUID a3, | @Query("p1") int p1, | @Query("p2") String p2, | @Query("p3") UUID p3, | @HasQuery("p3") boolean hasP3, | @Path("/*") String remainder, | @Header("Accept-Language") String lang, | @Header("Accept") String accept, | @Header("DNT") int doNotTrack, | RequestAttributes attributes, | ResourceBundle nls | ) { | // Do something with all of those | }

Additional parameter types can be defined by overriding {@link oajr.RestContext.Builder#createRestOpArgs(BeanStore,Supplier)} or by adding them to the bean store using {@link oajr.RestContext.Builder#createBeanStore(Class,Supplier)}.