src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java

changeset 58
8d3047f78190
parent 57
1262b5433644
child 63
51aa5e267c7f
equal deleted inserted replaced
57:1262b5433644 58:8d3047f78190
164 paramsInjectible &= HttpServletRequest.class.isAssignableFrom(param) 164 paramsInjectible &= HttpServletRequest.class.isAssignableFrom(param)
165 || HttpServletResponse.class.isAssignableFrom(param) 165 || HttpServletResponse.class.isAssignableFrom(param)
166 || DataAccessObjects.class.isAssignableFrom(param); 166 || DataAccessObjects.class.isAssignableFrom(param);
167 } 167 }
168 if (paramsInjectible) { 168 if (paramsInjectible) {
169 final String requestPath = "/" + mapping.get().requestPath() 169 String requestPath = "/" + mapping.get().requestPath();
170 + (mapping.get().menuKey().isBlank() ? "" : "/"); 170 if (!mapping.get().requestPath().isBlank() && !mapping.get().menuKey().isBlank()) {
171 requestPath += "/";
172 }
171 173
172 if (mappings 174 if (mappings
173 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>()) 175 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())
174 .putIfAbsent(requestPath, method) != null) { 176 .putIfAbsent(requestPath, method) != null) {
175 LOG.warn("{} {} has multiple mappings", 177 LOG.warn("{} {} has multiple mappings",

mercurial