This commit is contained in:
RedKale
2016-06-26 10:24:46 +08:00
parent a0439518f3
commit 56cd881a99

View File

@@ -91,7 +91,10 @@ public final class HttpPrepareServlet extends PrepareServlet<String, HttpContext
if (prefix == null) prefix = "";
if (mappings.length < 1) {
WebServlet ws = servlet.getClass().getAnnotation(WebServlet.class);
if (ws != null) mappings = ws.value();
if (ws != null) {
mappings = ws.value();
if (!ws.repair()) prefix = "";//被设置为自动追加前缀则清空prefix
}
}
for (String mapping : mappings) {
if (!prefix.toString().isEmpty()) mapping = prefix + mapping;