begin service structure

This commit is contained in:
2025-10-08 18:03:16 +02:00
parent 174338f88e
commit 714b3e3319
11 changed files with 136 additions and 19 deletions

View File

@@ -0,0 +1,14 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@Slf4j
@ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "RACER_NOT_FOUND")
public class RacerNotFoundException extends RuntimeException {
public RacerNotFoundException(String message) {
super(message);
log.error(message);
}
}

View File

@@ -0,0 +1,15 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import de.pnreichmuth.timekeep_backend.entities.Team;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.CONFLICT, reason = "TEAM_EXISTS")
@Slf4j
public class TeamExistsException extends RuntimeException {
public TeamExistsException(String message, Team team) {
super(message);
log.warn(message, team.getTeamName());
}
}

View File

@@ -0,0 +1,14 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@Slf4j
@ResponseStatus(HttpStatus.NOT_FOUND)
public class TeamNotFoundException extends RuntimeException {
public TeamNotFoundException(String message) {
super(message);
log.error(message);
}
}