From 744628906473e6894bd0409ebe21bc4ced489ab8 Mon Sep 17 00:00:00 2001 From: Gabriel Roldan Date: Wed, 28 Aug 2024 22:38:08 -0300 Subject: [PATCH] Add routes to /webresources/wfs/** and /webresources/wms/** --- config | 2 +- .../geoserver/cloud/wfs/app/WFSController.java | 15 +++++++++++++++ .../cloud/wms/controller/WMSController.java | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/config b/config index a7f37585e..e1ad364c8 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit a7f37585efbf66faf57403fe04f3e157005f6a08 +Subproject commit e1ad364c8dc9482d1a445e7c50822d597232e4f4 diff --git a/src/apps/geoserver/wfs/src/main/java/org/geoserver/cloud/wfs/app/WFSController.java b/src/apps/geoserver/wfs/src/main/java/org/geoserver/cloud/wfs/app/WFSController.java index 770677987..3ec7ecb19 100644 --- a/src/apps/geoserver/wfs/src/main/java/org/geoserver/cloud/wfs/app/WFSController.java +++ b/src/apps/geoserver/wfs/src/main/java/org/geoserver/cloud/wfs/app/WFSController.java @@ -40,6 +40,21 @@ public void getSchema(HttpServletRequest request, HttpServletResponse response) classPathPublisher.handleRequest(request, response); } + /** + * Serve satic resources from classpath. + * + *

I.e.: + * + *

+ */ + @GetMapping(path = {"/webresources/wfs/**"}) + public void getStaticResource(HttpServletRequest request, HttpServletResponse response) + throws Exception { + classPathPublisher.handleRequest(request, response); + } + @GetMapping(path = {"/wfs", "/ows"}) public void handleGet(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/src/apps/geoserver/wms/src/main/java/org/geoserver/cloud/wms/controller/WMSController.java b/src/apps/geoserver/wms/src/main/java/org/geoserver/cloud/wms/controller/WMSController.java index 771e76751..71eb20779 100644 --- a/src/apps/geoserver/wms/src/main/java/org/geoserver/cloud/wms/controller/WMSController.java +++ b/src/apps/geoserver/wms/src/main/java/org/geoserver/cloud/wms/controller/WMSController.java @@ -57,9 +57,12 @@ public void getWmsSchema(HttpServletRequest request, HttpServletResponse respons * */ - @GetMapping(path = {"/openlayers/**", "/openlayers3/**"}) + @GetMapping( + path = {"/openlayers/**", "/openlayers3/**", "/webresources/wms/**", "/options.png"}) public void getStaticResource(HttpServletRequest request, HttpServletResponse response) throws Exception { classPathPublisher.handleRequest(request, response);