You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
package com.fr.plugin.demo.web.request.handler; |
|
|
|
import com.fanruan.api.decision.AuthorityKit; |
|
import com.fanruan.api.web.FlushKit; |
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
/** |
|
* @author Elijah |
|
* @version 10.0.4 |
|
* Created by Elijah on 2019/11/15 |
|
*/ |
|
public class ModuleHttpHandler extends BaseHttpHandler { |
|
@Override |
|
public RequestMethod getMethod() { |
|
return RequestMethod.GET; |
|
} |
|
|
|
@Override |
|
public String getPath() { |
|
return "/demo/module"; |
|
} |
|
|
|
@Override |
|
public boolean isPublic() { |
|
return false; |
|
} |
|
|
|
public String[] modules() { |
|
return new String[] {AuthorityKit.Management.USER}; |
|
} |
|
|
|
@Override |
|
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse response) throws Exception { |
|
FlushKit.printAsString(response, "这是个有用户管理权限的次管才能访问的接口"); |
|
} |
|
} |