Bind /notif to WebInitializer 83/103983/3
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 11 Jan 2023 01:01:13 +0000 (02:01 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 11 Jan 2023 13:42:43 +0000 (13:42 +0000)
"/notif" is actually tied through WebInitializer, make sure that
connection is expressed in code.

Change-Id: I893fbece36ab8ec4d2fe30b3db9947f1521c9c71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/web/WebInitializer.java

index 5bab8a0eebc946f675ce0a28522da79e7f45bae3..17ee5b16d1e523cca50230827250399236059f40 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.restconf.nb.rfc8040.web;
 import static org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfStreamsConstants.DATA_SUBSCRIPTION;
 import static org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfStreamsConstants.NOTIFICATION_STREAM;
 import static org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants.BASE_URI_PATTERN;
+import static org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants.NOTIF;
 
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
@@ -54,7 +55,7 @@ public final class WebInitializer implements AutoCloseable {
                 .asyncSupported(true)
                 .build())
             .addServlet(ServletDetails.builder()
-                .addUrlPattern("/notif/*")
+                .addUrlPattern("/" + NOTIF + "/*")
                 .servlet(servletSupport.createHttpServletBuilder(webAppNotif).build())
                 .name("notificationServlet")
                 .asyncSupported(true)