Refactor BFF Package Structure #64

Merged
stne3960 merged 12 commits from refactor/bff-structure into main 2026-01-12 17:38:55 +01:00
Showing only changes of commit 2c7c23ab9c - Show all commits

View File

@ -1,9 +1,10 @@
package se.su.dsv.studentportalen.bff;
package se.su.dsv.studentportalen.bff.controller;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClient;
import se.su.dsv.studentportalen.bff.config.BackendApiConfiguration;
import java.time.Duration;
import java.util.concurrent.ExecutionException;
@ -15,6 +16,9 @@ import java.util.concurrent.StructuredTaskScope.Subtask;
@Profile("development")
public class TestController {
private static final int NAME_DELAY_SECONDS = 2;
private static final int EMAIL_DELAY_SECONDS = 3;
private final RestClient restClient;
private final BackendApiConfiguration backendApiConfiguration;
@ -67,13 +71,13 @@ public class TestController {
@RequestMapping("/name")
public String name() throws InterruptedException {
Thread.sleep(Duration.ofSeconds(2));
Thread.sleep(Duration.ofSeconds(NAME_DELAY_SECONDS));
return "Greg";
}
@RequestMapping("/email")
public String email() throws InterruptedException {
Thread.sleep(Duration.ofSeconds(3));
Thread.sleep(Duration.ofSeconds(EMAIL_DELAY_SECONDS));
return "greg@localhost";
}