diff --git a/reference-app/src/test/java/com/ardetrick/oryhydrareference/TestOryHydraReferenceApplication.java b/reference-app/src/test/java/com/ardetrick/oryhydrareference/TestOryHydraReferenceApplication.java index 6a56af9..b7afc6a 100644 --- a/reference-app/src/test/java/com/ardetrick/oryhydrareference/TestOryHydraReferenceApplication.java +++ b/reference-app/src/test/java/com/ardetrick/oryhydrareference/TestOryHydraReferenceApplication.java @@ -2,8 +2,11 @@ import com.ardetrick.testcontainers.OryHydraContainer; import java.util.List; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; +import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; /** @@ -11,8 +14,8 @@ * seeded demo client, so running locally is one command with nothing to install but Docker. * *
Run {@code ./gradlew bootTestRun}, then open http://localhost:8080/demo and log in with {@code
- * foo@bar.com} / {@code password}.
+ * href="http://localhost:8080">http://localhost:8080 and log in with {@code foo@bar.com} /
+ * {@code password}.
*/
public class TestOryHydraReferenceApplication {
@@ -22,9 +25,20 @@ public static void main(String[] args) {
.run(args);
}
+ @Slf4j
@TestConfiguration(proxyBeanMethods = false)
static class LocalHydraConfiguration {
+ // End the startup logs with the link to click — the convention of one-command dev servers.
+ // Dev-time only: the production app cannot know its public URL, but this configuration
+ // already pins every port, so it can.
+ @Bean
+ ApplicationListener