-
I'm using micronaut 2.0 with Kotlin and would like to creating something like the following: @Controller("/foo/*/api/v1")
class MyController {
@Get("/data")
fun data(): String {
...
}
} What I would like is for this controller to match |
Beta Was this translation helpful? Give feedback.
Answered by
ilopmar
Sep 25, 2020
Replies: 1 comment 1 reply
-
You can put there any arbitrary variable: @Controller("/foo/{something}/api/v1")
public class HelloController {
@Get("/data")
public String data1() {
return "data1";
}
@Get("/data2")
public String data2() {
return "data2";
}
} This will match:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ilopmar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can put there any arbitrary variable:
This will match: