initial commit

Este commit está contenido en:
Antoine 2020-08-12 08:41:28 +02:00
commit 70b32f380c
Firmado por: antoine
ID de clave GPG: 098FB66FC0475E70
Se han modificado 5 ficheros con 141 adiciones y 0 borrados

22
.editorconfig Archivo normal
Ver fichero

@ -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

3
.gitignore vendido Archivo normal
Ver fichero

@ -0,0 +1,3 @@
.idea/
*.iml
target/

79
pom.xml Archivo normal
Ver fichero

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.antoine-roux</groupId>
<artifactId>wikiProject</artifactId>
<version>${revision}</version>
<name>wikiProject</name>
<description>project use wikipedia streaming api https://stream.wikimedia.org/?doc#/Streams/get_v2_stream_test</description>
<properties>
<revision>1.0-SNAPSHOT</revision>
<java.version>14</java.version>
<spring-boot.version>2.3.2.RELEASE</spring-boot.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>

Ver fichero

@ -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<ServerResponse> routes() {
return RouterFunctions.route()
.GET("/toto", serverRequest -> ServerResponse.ok().body("hello world !"))
.build();
}
}

Ver fichero

@ -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