From 70b32f380c54a3cc07c137cc8bf6bbae163eb8d8 Mon Sep 17 00:00:00 2001 From: Antoine Date: Wed, 12 Aug 2020 08:41:28 +0200 Subject: [PATCH] initial commit --- .editorconfig | 22 ++++++ .gitignore | 3 + pom.xml | 79 +++++++++++++++++++ .../tk/antoine_roux/wiki/MainLauncher.java | 30 +++++++ src/main/resources/application.properties | 7 ++ 5 files changed, 141 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/tk/antoine_roux/wiki/MainLauncher.java create mode 100644 src/main/resources/application.properties diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a4d2269 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Set default charset +[*.java] +charset = utf-8 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +# Indentation override for all JS under lib directory +[**.{properties, json, yml, yaml}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4bfa550 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea/ +*.iml +target/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..21c1e8b --- /dev/null +++ b/pom.xml @@ -0,0 +1,79 @@ + + + 4.0.0 + + fr.antoine-roux + wikiProject + ${revision} + wikiProject + project use wikipedia streaming api https://stream.wikimedia.org/?doc#/Streams/get_v2_stream_test + + + 1.0-SNAPSHOT + 14 + 2.3.2.RELEASE + 3.8.1 + + + + + + + org.springframework.boot + spring-boot-starter-parent + ${spring-boot.version} + pom + import + + + org.springframework.boot + spring-boot-starter + ${spring-boot.version} + + + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${java.version} + --enable-preview + + + + + + \ No newline at end of file diff --git a/src/main/java/tk/antoine_roux/wiki/MainLauncher.java b/src/main/java/tk/antoine_roux/wiki/MainLauncher.java new file mode 100644 index 0000000..06b95ed --- /dev/null +++ b/src/main/java/tk/antoine_roux/wiki/MainLauncher.java @@ -0,0 +1,30 @@ +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 routes() { + return RouterFunctions.route() + .GET("/toto", serverRequest -> ServerResponse.ok().body("hello world !")) + .build(); + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..c9d053e --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,7 @@ +spring.main.banner-mode=off +spring.main.lazy-initialization=true +spring.output.ansi.enabled=ALWAYS + +server.port=8081 + +wikiproject.basePath=/wikiproject