@Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface Path
@Path("/r") class Resources { @GET("/sub") public void method() { } }
Jooby supports Ant-style path patterns:
Some examples:
com/t?st.html
- matches com/test.html
but also com/tast.jsp
or
com/txst.html
com/*.html
- matches all .html
files in the com
directorycom/**/test.html
- matches all test.html
files underneath the
com
path**
/*
- matches any path at any level.*
- matches any path at any level, shorthand for **
/*
.Jooby supports path parameters too:
Some examples:
/user/{id}
- /user/* and give you access to the id
var. /user/{id:\\d+}
- /user/[digits] and give you access to the numeric
id
var.public abstract String[] value
Copyright © 2022. All rights reserved.