From df3a1ef84d0875e396d59f3eb96e4c8b205359a4 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Sat, 13 May 2017 15:39:58 +0800 Subject: [PATCH] --- src/org/redkale/net/http/Rest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/redkale/net/http/Rest.java b/src/org/redkale/net/http/Rest.java index 49857ac69..38f5edcc3 100644 --- a/src/org/redkale/net/http/Rest.java +++ b/src/org/redkale/net/http/Rest.java @@ -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();