This commit is contained in:
@@ -42,7 +42,14 @@ public class RestDocs extends HttpBaseServlet {
|
||||
continue;
|
||||
}
|
||||
final Map<String, Object> servletmap = new LinkedHashMap<>();
|
||||
servletmap.put("mappings", ws.value());
|
||||
String prefix = _prefix(servlet);
|
||||
String[] mappings = ws.value();
|
||||
if (prefix != null && !prefix.isEmpty()) {
|
||||
for (int i = 0; i < mappings.length; i++) {
|
||||
mappings[i] = prefix + mappings[i];
|
||||
}
|
||||
}
|
||||
servletmap.put("mappings", mappings);
|
||||
servletmap.put("moduleid", ws.moduleid());
|
||||
servletmap.put("name", ws.name());
|
||||
servletmap.put("comment", ws.comment());
|
||||
|
||||
@@ -192,6 +192,10 @@ public abstract class HttpBaseServlet extends HttpServlet {
|
||||
|
||||
public abstract boolean authenticate(int module, int actionid, HttpRequest request, HttpResponse response) throws IOException;
|
||||
|
||||
protected String _prefix(HttpServlet servlet) {
|
||||
return servlet._prefix;
|
||||
}
|
||||
|
||||
private HashMap<String, Entry> load() {
|
||||
final boolean typeIgnore = this.getClass().getAnnotation(AuthIgnore.class) != null;
|
||||
WebServlet module = this.getClass().getAnnotation(WebServlet.class);
|
||||
|
||||
Reference in New Issue
Block a user