Add the REST model to return an error or an message as a JSON.

This commit is contained in:
2023-12-03 11:47:30 +02:00
parent 66b713fae5
commit 84e6cd84db
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,15 @@
package space.kklochko.spring_rest_example.models.rest;
import lombok.AllArgsConstructor;
import lombok.Data;
@AllArgsConstructor
@Data
public class RestError {
public String error;
public RestError() {
error = "";
}
}
@@ -0,0 +1,15 @@
package space.kklochko.spring_rest_example.models.rest;
import lombok.AllArgsConstructor;
import lombok.Data;
@AllArgsConstructor
@Data
public class RestMessage {
public String message;
public RestMessage() {
message = "";
}
}