Skip to content

Instantly share code, notes, and snippets.

@olbpetersson
Created December 7, 2017 21:23
Show Gist options
  • Save olbpetersson/eb5732609b128aea0d44038e40dbb4c7 to your computer and use it in GitHub Desktop.
Save olbpetersson/eb5732609b128aea0d44038e40dbb4c7 to your computer and use it in GitHub Desktop.
@Configuration
public class WebConfiguration {
@Bean
RouterFunction<?> routes(HelloWorldService helloWorldService) {
// request.pathVariable holds path-variables
return RouterFunctions.route(
GET("func-hello"),
request -> ServerResponse.ok().body(helloWorldService.getHelloWorld(), String.class));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment