This commit is contained in:
Redkale
2017-05-13 15:39:58 +08:00
parent 242b13fff0
commit df3a1ef84d

View File

@@ -1056,7 +1056,11 @@ public final class Rest {
this.methodidx = methodidx;
this.ignore = mapping.ignore();
String n = mapping.name().toLowerCase();
if (n.isEmpty()) n = method.getName().toLowerCase().replace(defmodulename.toLowerCase(), "");
if (n.isEmpty()) {
String t = method.getName().toLowerCase();
int pos = t.indexOf(defmodulename.toLowerCase());
n = pos > 0 ? t.substring(0, pos) : t;
}
this.name = n;
this.mappingMethod = method;
this.methods = mapping.methods();