You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/09/15 10:31:11 UTC
[isis] branch master updated: ISIS-2429: demo: fixes broken class
(ThereCanBeOnlyOne)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 79ed355 ISIS-2429: demo: fixes broken class (ThereCanBeOnlyOne)
79ed355 is described below
commit 79ed3556035db9a312a93a3734f416b0018620f8
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Sep 15 12:30:56 2020 +0200
ISIS-2429: demo: fixes broken class (ThereCanBeOnlyOne)
---
.../main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java b/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
index c3a1440..096c39c 100644
--- a/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
+++ b/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
@@ -30,15 +30,18 @@ import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.BasicAuthCache;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.HttpClientBuilder;
+import org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
import lombok.val;
@Component
-public class ThereCanBeOnlyOne implements ApplicationListener<EmbeddedServletContainerInitializedEvent> {
+public class ThereCanBeOnlyOne implements ApplicationListener<ServletWebServerInitializedEvent > {
@Override
- public void onApplicationEvent(final EmbeddedServletContainerInitializedEvent event) {
- final int port = event.getEmbeddedServletContainer().getPort();
+ public void onApplicationEvent(final ServletWebServerInitializedEvent event) {
+ final int port = event.getWebServer().getPort();
try {
invokeRemoteShutdown(port);