mirror of
https://github.com/PaulReichmuth/timekeep-backend.git
synced 2025-12-22 22:41:59 +00:00
first small testing prototype
This commit is contained in:
@@ -2,12 +2,13 @@ package de.pnreichmuth.timekeep_backend;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
public class TimekeepBackendApplication {
|
||||
|
||||
static void main(String[] args) {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TimekeepBackendApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user