Sun, 17 May 2020 15:24:58 +0200
fixes sub-menu entries not mapping correctly due to buggy handling of trailing slash
--- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat May 16 17:22:45 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sun May 17 15:24:58 2020 +0200 @@ -166,7 +166,8 @@ || DataAccessObjects.class.isAssignableFrom(param); } if (paramsInjectible) { - final String requestPath = "/" + mapping.get().requestPath(); + final String requestPath = "/" + mapping.get().requestPath() + + (mapping.get().menuKey().isBlank() ? "" : "/"); if (mappings .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())
--- a/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 16 17:22:45 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/ModuleManager.java Sun May 17 15:24:58 2020 +0200 @@ -155,7 +155,7 @@ new ResourceKey( mod.bundleBaseName(), mod.menuKey()), - mod.modulePath(), + mod.modulePath()+"/", mod.defaultPriority())) .sorted() .forEachOrdered(mainMenu::add);
--- a/src/main/webapp/WEB-INF/jspf/menu-entry.jspf Sat May 16 17:22:45 2020 +0200 +++ b/src/main/webapp/WEB-INF/jspf/menu-entry.jspf Sun May 17 15:24:58 2020 +0200 @@ -30,7 +30,7 @@ data-active </c:if> > - <a href="${menu.pathName}/"> + <a href="${menu.pathName}"> <fmt:bundle basename="${menu.resourceKey.bundle}"> <fmt:message key="${menu.resourceKey.key}"/> </fmt:bundle>