base of backend
Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com> Reviewed-on: #29 Co-authored-by: Anthony Debucquoy <debucquoy.anthony@gmail.com> Co-committed-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
37
backend/.gitignore
vendored
Normal file
37
backend/.gitignore
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
HELP.md
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
39
backend/build.gradle.kts
Normal file
39
backend/build.gradle.kts
Normal file
@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
java
|
||||
id("org.springframework.boot") version "3.2.2"
|
||||
id("io.spring.dependency-management") version "1.1.4"
|
||||
}
|
||||
|
||||
group = "ovh.herisson"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 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")
|
||||
developmentOnly("org.springframework.boot:spring-boot-devtools")
|
||||
// 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")
|
||||
}
|
||||
|
||||
tasks.register("run") {
|
||||
dependsOn(tasks.bootRun)
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
9
backend/compose.yaml
Normal file
9
backend/compose.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
services:
|
||||
postgres:
|
||||
image: 'postgres:latest'
|
||||
environment:
|
||||
- 'POSTGRES_DB=mydatabase'
|
||||
- 'POSTGRES_PASSWORD=secret'
|
||||
- 'POSTGRES_USER=myuser'
|
||||
ports:
|
||||
- '5432'
|
@ -0,0 +1,12 @@
|
||||
package ovh.herisson.Clyde;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
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
backend/src/main/resources/application.properties
Normal file
1
backend/src/main/resources/application.properties
Normal file
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,13 @@
|
||||
package ovh.herisson.Clyde;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
// import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
// @SpringBootTest
|
||||
class ClydeApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user