10.0请求接口demo
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.

38 lines
1010 B

4 years ago
package com.tptj.demo.hg.http.handler;
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 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-22
* 不需要鉴权的接口实现
* http://localhost:8075/webroot/decision/plugin/public/com.tptj.demo.hg.http.handler.v10/demo/public
**/
public class PublicHttpHandler extends BaseHttpHandler {
@Override
public RequestMethod getMethod() {
return RequestMethod.GET;
}
@Override
public String getPath() {
return "/demo/public";
}
@Override
public boolean isPublic() {
return true;
}
@Override
public void handle( HttpServletRequest request, HttpServletResponse response ) throws Exception {
FlushKit.printAsString( response, "Hello World!" );
}
}