Skip to content

Commit

Permalink
首次提交
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyenews committed Apr 11, 2021
1 parent a9f7896 commit 372d4b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ Magician.createHttpServer().httpHandler("/", req -> {
}).bind(8080).start();
```

## 开发文档
准备中......
## 开发资源
- 开发文档: [http://magician-io.com/docs/index.html](http://magician-io.com/docs/web/index.html)
- 使用示例: [https://github.com/yuyenews/Magician-Web-Example](https://github.com/yuyenews/Magician-Web-Example)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.magician.web.core.util;

import com.magician.web.core.annotation.Route;
import com.magician.web.core.annotation.Verification;
import io.magician.tcp.http.request.MagicianRequest;
import org.slf4j.Logger;
Expand Down Expand Up @@ -144,8 +145,13 @@ private static boolean isThisApi(String[] apis, Method method){
if(apis == null || apis.length < 1){
return true;
}
Route route = method.getAnnotation(Route.class);
if(route == null){
return false;
}

for(String api : apis){
if(MatchUtil.isMatch(api,method.getName())){
if(MatchUtil.isMatch(api,route.value())){
return true;
}
}
Expand Down

0 comments on commit 372d4b3

Please sign in to comment.