31 lines
877 B
Java
31 lines
877 B
Java
|
package tk.antoine_roux.wiki;
|
||
|
|
||
|
import org.springframework.boot.SpringApplication;
|
||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||
|
import org.springframework.context.annotation.Bean;
|
||
|
import org.springframework.web.servlet.function.RouterFunction;
|
||
|
import org.springframework.web.servlet.function.RouterFunctions;
|
||
|
import org.springframework.web.servlet.function.ServerResponse;
|
||
|
|
||
|
/**
|
||
|
* Main class
|
||
|
* program input
|
||
|
*/
|
||
|
@SpringBootApplication
|
||
|
public class MainLauncher {
|
||
|
|
||
|
/*
|
||
|
* entry point for our application
|
||
|
*/
|
||
|
public static void main(String[] args) {
|
||
|
SpringApplication.run(MainLauncher.class, args);
|
||
|
}
|
||
|
|
||
|
@Bean
|
||
|
public RouterFunction<ServerResponse> routes() {
|
||
|
return RouterFunctions.route()
|
||
|
.GET("/toto", serverRequest -> ServerResponse.ok().body("hello world !"))
|
||
|
.build();
|
||
|
}
|
||
|
}
|