【RESTful JPA One-liners With Rapidoid】 must in main function?
aqnaruto opened this issue · comments
JPA One-liners is cool,
but i want separate different route in different class。
so,how do i keep One-liners in those classes,not Mian() function
Quite easy. You can use create a Controller class with a root url and then use @get and @post annotations with desired path to map to desired methods. Check the documentation for @get / @post
rapidoid doc
@sezinkarli thankyou reply ,but what i want is 【One-liners】,just like
On.get("/showPath").json((Req req) -> req.path())
not like
@POST
public String lower(Req req, Resp resp, @Param("x") String s) {
return s.toLowerCase();
}
it is MultiLine ,
it is not cool
hey,could this issue what i say be a feature request or enhancement @nmihajlovski