First Commit
This commit is contained in:
29
backend/build.gradle.kts
Normal file
29
backend/build.gradle.kts
Normal file
@ -0,0 +1,29 @@
|
||||
plugins {
|
||||
java
|
||||
id("org.springframework.boot") version "3.1.5"
|
||||
id("io.spring.dependency-management") version "1.1.3"
|
||||
}
|
||||
|
||||
group = "ovh.herisson"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// implementation("org.springframework.boot:spring-boot-starter-oauth2-authorization-server")
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
implementation("org.springframework.boot:spring-boot-starter-mail")
|
||||
developmentOnly("org.springframework.boot:spring-boot-devtools")
|
||||
runtimeOnly("org.postgresql:postgresql")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package ovh.herisson.casper;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ovh.herisson.casper.Responses.HelloWorld;
|
||||
|
||||
@SpringBootApplication
|
||||
@RestController
|
||||
public class CasperApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CasperApplication.class, args);
|
||||
}
|
||||
|
||||
@GetMapping("/test")
|
||||
@CrossOrigin(origins = "http://localhost:5175/")
|
||||
public HelloWorld hello(){
|
||||
return new HelloWorld();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package ovh.herisson.casper.Responses;
|
||||
|
||||
public class HelloWorld {
|
||||
|
||||
public String msg;
|
||||
public HelloWorld(){
|
||||
msg = "Hello, world";
|
||||
}
|
||||
}
|
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.casper;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class CasperApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user