diff --git a/packages/java/endpoint/src/main/java/com/vaadin/hilla/route/ClientRouteRegistry.java b/packages/java/endpoint/src/main/java/com/vaadin/hilla/route/ClientRouteRegistry.java index a571c3bbd2..8df3d8abc4 100644 --- a/packages/java/endpoint/src/main/java/com/vaadin/hilla/route/ClientRouteRegistry.java +++ b/packages/java/endpoint/src/main/java/com/vaadin/hilla/route/ClientRouteRegistry.java @@ -24,13 +24,14 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.util.AntPathMatcher; +import com.vaadin.flow.router.internal.ClientRoutesProvider; import java.io.IOException; -import java.io.Serializable; import java.net.MalformedURLException; import java.net.URL; import java.nio.file.Paths; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.Objects; @@ -40,7 +41,7 @@ * Keeps track of registered client side routes. */ @Component -public class ClientRouteRegistry implements Serializable { +public class ClientRouteRegistry implements ClientRoutesProvider { /** * A map of registered routes and their corresponding client view @@ -184,4 +185,10 @@ private void registerAndRecurseChildren(String basePath, }); } } + + @Override + public List getClientRoutes() { + return getAllRoutes().keySet().stream().toList(); + } + }