Skip to content

Instantly share code, notes, and snippets.

@timjonesdev
Created August 21, 2019 00:28
Show Gist options
  • Save timjonesdev/fb025437ab01204e061af7b76e13089e to your computer and use it in GitHub Desktop.
Save timjonesdev/fb025437ab01204e061af7b76e13089e to your computer and use it in GitHub Desktop.
@Bean
public RouterFunction<ServerResponse> route(TeamHandler teamHandler) {
return RouterFunctions
.route(RequestPredicates.GET("/teams"), teamHandler::getTeams)
.andRoute(RequestPredicates.GET("/teams/watch"), teamHandler::watchTeams)
.andRoute(RequestPredicates.GET("/team/{name}"), teamHandler::watchTeam);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment