Last active
February 23, 2021 15:59
-
-
Save vacax/d34a56fe834f3d6ea1d48f6735c81287 to your computer and use it in GitHub Desktop.
Ruta con filtro activado para todo un contexto en Javalin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javalin app = getInstanciaJavalin(); | |
app.routes(()->{ | |
path("/path/", () -> { | |
before(ctx -> { | |
System.out.println("Entrando a la ruta path..."); | |
}); | |
get("/", ctx -> { | |
ctx.result("Ruta path /"); | |
}); | |
get("/compras", ctx -> { | |
ctx.result("Ruta /path/compras"); | |
}); | |
get("/otro", ctx -> { | |
ctx.result("Ruta /path/otro"); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment