first small testing prototype

This commit is contained in:
2025-10-01 10:56:19 +02:00
parent 4742fcd21c
commit 7b88efb425
3 changed files with 35 additions and 10 deletions

17
pom.xml
View File

@@ -8,6 +8,7 @@
<version>4.0.0-M3</version> <version>4.0.0-M3</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>de.pnreichmuth</groupId> <groupId>de.pnreichmuth</groupId>
<artifactId>timekeep-backend</artifactId> <artifactId>timekeep-backend</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
@@ -30,14 +31,14 @@
<java.version>25</java.version> <java.version>25</java.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <!-- <dependency>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-data-jdbc</artifactId> <!-- <artifactId>spring-boot-starter-data-jdbc</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-data-jpa</artifactId> <!-- <artifactId>spring-boot-starter-data-jpa</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>

View File

@@ -2,12 +2,13 @@ package de.pnreichmuth.timekeep_backend;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication @SpringBootApplication
public class TimekeepBackendApplication { public class TimekeepBackendApplication {
static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(TimekeepBackendApplication.class, args); SpringApplication.run(TimekeepBackendApplication.class, args);
} }
} }

View File

@@ -0,0 +1,23 @@
package de.pnreichmuth.timekeep_backend;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
public class TimekeepRestController {
public TimekeepRestController() {
}
@GetMapping("/time/test")
public Testclass timeEndpoint(){
return new Testclass("TEST",1);
}
@GetMapping("/time")
public Date getTime(){
return new Date();
}
}