diff --git a/.gitignore b/.gitignore index 1b6985c..24a8972 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Ignore Gradle build output directory build + +.project +.settings diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 66019d7..3a25132 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -16,17 +16,17 @@ repositories { } dependencies { - implementation("org.springframework.boot:spring-boot-starter-jdbc") + // implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-mail") implementation("org.springframework.boot:spring-boot-starter-web") - implementation("org.springframework.session:spring-session-jdbc") + // implementation("org.springframework.session:spring-session-jdbc") developmentOnly("org.springframework.boot:spring-boot-devtools") - developmentOnly("org.springframework.boot:spring-boot-docker-compose") + // developmentOnly("org.springframework.boot:spring-boot-docker-compose") runtimeOnly("org.postgresql:postgresql") testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.springframework.boot:spring-boot-testcontainers") - testImplementation("org.testcontainers:junit-jupiter") - testImplementation("org.testcontainers:postgresql") + // testImplementation("org.springframework.boot:spring-boot-testcontainers") + // testImplementation("org.testcontainers:junit-jupiter") + // testImplementation("org.testcontainers:postgresql") } tasks.register("run") { diff --git a/backend/src/main/java/ovh/herisson/Clyde/ClydeApplication.java b/backend/src/main/java/ovh/herisson/Clyde/ClydeApplication.java index 48a3df1..aa2882d 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/ClydeApplication.java +++ b/backend/src/main/java/ovh/herisson/Clyde/ClydeApplication.java @@ -9,5 +9,4 @@ public class ClydeApplication { public static void main(String[] args) { SpringApplication.run(ClydeApplication.class, args); } - } diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/PingController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/PingController.java new file mode 100644 index 0000000..f4f010d --- /dev/null +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/PingController.java @@ -0,0 +1,18 @@ +package ovh.herisson.Clyde.EndPoints; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import ovh.herisson.Clyde.Ping; + +@RestController +public class PingController { + + @GetMapping("/ping") + public Ping ping(){ + return new Ping(1, "test"); + } + +} + + diff --git a/backend/src/main/java/ovh/herisson/Clyde/Ping.java b/backend/src/main/java/ovh/herisson/Clyde/Ping.java new file mode 100644 index 0000000..757b1e2 --- /dev/null +++ b/backend/src/main/java/ovh/herisson/Clyde/Ping.java @@ -0,0 +1,3 @@ +package ovh.herisson.Clyde; + +public record Ping(int id, String txt){}; diff --git a/backend/src/test/java/ovh/herisson/Clyde/ClydeApplicationTests.java b/backend/src/test/java/ovh/herisson/Clyde/ClydeApplicationTests.java index 51e6d6b..4714cbc 100644 --- a/backend/src/test/java/ovh/herisson/Clyde/ClydeApplicationTests.java +++ b/backend/src/test/java/ovh/herisson/Clyde/ClydeApplicationTests.java @@ -1,9 +1,9 @@ package ovh.herisson.Clyde; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; +// import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +// @SpringBootTest class ClydeApplicationTests { @Test diff --git a/backend/src/test/java/ovh/herisson/Clyde/TestClydeApplication.java b/backend/src/test/java/ovh/herisson/Clyde/TestClydeApplication.java deleted file mode 100644 index a912d0b..0000000 --- a/backend/src/test/java/ovh/herisson/Clyde/TestClydeApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package ovh.herisson.Clyde; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.context.annotation.Bean; -import org.testcontainers.containers.PostgreSQLContainer; -import org.testcontainers.utility.DockerImageName; - -@TestConfiguration(proxyBeanMethods = false) -public class TestClydeApplication { - - @Bean - @ServiceConnection - PostgreSQLContainer postgresContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:latest")); - } - - public static void main(String[] args) { - SpringApplication.from(ClydeApplication::main).with(TestClydeApplication.class).run(args); - } - -}