Package play.routing
Interface RoutingDslComponents
- All Superinterfaces:
BodyParserComponents,HttpConfigurationComponents,HttpErrorHandlerComponents,PekkoComponents,TemporaryFileComponents
- All Known Implementing Classes:
RoutingDslComponentsFromContext
Java Components for RoutingDsl.
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").routingTo(req -> Results.ok("The content"))
.build();
}
// other methods
}
- See Also:
-
Method Summary
Methods inherited from interface play.components.BodyParserComponents
anyContentBodyParser, bytesBodyParser, defaultBodyParser, defaultScalaBodyParser, emptyBodyParser, formUrlEncodedBodyParser, jsonBodyParser, multipartFormDataBodyParser, rawBodyParser, scalaBodyParsers, textBodyParser, tolerantJsonBodyParser, tolerantTextBodyParser, tolerantXmlBodyParser, xmlBodyParserMethods inherited from interface play.components.HttpConfigurationComponents
httpConfiguration, sessionConfigurationMethods inherited from interface play.components.HttpErrorHandlerComponents
httpErrorHandler, javaContextComponents, scalaHttpErrorHandlerMethods inherited from interface play.components.PekkoComponents
actorSystem, coordinatedShutdown, executionContext, materializerMethods inherited from interface play.components.TemporaryFileComponents
tempFileCreator
-
Method Details
-
routingDsl
-