public interface RoutingDslComponents extends BodyParserComponents
Usage:
public class MyComponentsWithRouter extends RoutingDslComponentsFromContext implements HttpFiltersComponents {
public MyComponentsWithRouter(ApplicationLoader.Context context) {
super(context);
}
public Router router() {
// routingDsl method is provided by RoutingDslComponentsFromContext
return routingDsl()
.GET("/path").routeTo(() -> Results.ok("The content"))
.build();
}
// other methods
}
RoutingDsl| Modifier and Type | Method and Description |
|---|---|
default RoutingDsl |
routingDsl() |
anyContentBodyParser, bytesBodyParser, defaultBodyParser, defaultScalaBodyParser, emptyBodyParser, formUrlEncodedBodyParser, jsonBodyParser, multipartFormDataBodyParser, rawBodyParser, scalaBodyParsers, textBodyParser, tolerantJsonBodyParser, tolerantTextBodyParser, tolerantXmlBodyParser, xmlBodyParserhttpErrorHandler, javaContextComponents, scalaHttpErrorHandlerhttpConfiguration, sessionConfigurationactorSystem, coordinatedShutdown, executionContext, materializertempFileCreatordefault RoutingDsl routingDsl()