ping
This commit is contained in:
parent
02cefc7e08
commit
9b24434108
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
.project
|
||||
.settings
|
||||
|
@ -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") {
|
||||
|
@ -9,5 +9,4 @@ public class ClydeApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ClydeApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
3
backend/src/main/java/ovh/herisson/Clyde/Ping.java
Normal file
3
backend/src/main/java/ovh/herisson/Clyde/Ping.java
Normal file
@ -0,0 +1,3 @@
|
||||
package ovh.herisson.Clyde;
|
||||
|
||||
public record Ping(int id, String txt){};
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user