From 4692ef70a5995a578d44211f81eb7e399ca7d008 Mon Sep 17 00:00:00 2001 From: Bosn Ma Date: Tue, 27 May 2014 11:27:04 +0800 Subject: [PATCH] fix bugs --- .settings/.jsdtscope | 1 - WebContent/demo/mock.plugin/index.htm | 4 ++-- src/com/taobao/rigel/rap/project/dao/impl/ProjectDaoImpl.java | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope index 49b9981..3a28de0 100644 --- a/.settings/.jsdtscope +++ b/.settings/.jsdtscope @@ -8,6 +8,5 @@ - diff --git a/WebContent/demo/mock.plugin/index.htm b/WebContent/demo/mock.plugin/index.htm index e06ee01..69839a5 100644 --- a/WebContent/demo/mock.plugin/index.htm +++ b/WebContent/demo/mock.plugin/index.htm @@ -6,7 +6,7 @@ - + @@ -15,7 +15,7 @@ KISSY.use([ 'node', 'ajax' ], { success : function(S, Node, IO) { IO({ - url : '/id1090/RESTful_API_reg.json', + url : '/test3', dataType : 'json', type : 'get', success : function(data) { diff --git a/src/com/taobao/rigel/rap/project/dao/impl/ProjectDaoImpl.java b/src/com/taobao/rigel/rap/project/dao/impl/ProjectDaoImpl.java index 374f5ec..6291e91 100644 --- a/src/com/taobao/rigel/rap/project/dao/impl/ProjectDaoImpl.java +++ b/src/com/taobao/rigel/rap/project/dao/impl/ProjectDaoImpl.java @@ -303,6 +303,9 @@ public List getMatchedActionList(int projectId, String pattern) { List result = new ArrayList(); for (Action action : list) { String url = action.getRequestUrl(); + if (url != null && !url.isEmpty() && url.charAt(0) != '/') { + url = "/" + url; + } if (url.startsWith("reg:")) { // regular pattern if (StringUtils.regMatch(url.substring(4), pattern)) { result.add(action);