richie
6 years ago
5 changed files with 43 additions and 6 deletions
@ -0,0 +1,34 @@
|
||||
package com.fr.plugin.demo.web.request.handler; |
||||
|
||||
import com.fr.decision.fun.impl.BaseHttpHandler; |
||||
import com.fr.third.springframework.web.bind.annotation.RequestMethod; |
||||
import com.fr.web.utils.WebUtils; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.io.PrintWriter; |
||||
|
||||
public class PrivateHttpHandler extends BaseHttpHandler { |
||||
@Override |
||||
public RequestMethod getMethod() { |
||||
return RequestMethod.GET; |
||||
} |
||||
|
||||
@Override |
||||
public String getPath() { |
||||
return "/demo/abc"; |
||||
} |
||||
|
||||
@Override |
||||
public boolean isPublic() { |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception { |
||||
PrintWriter writer = WebUtils.createPrintWriter(res); |
||||
writer.println("Hello, I am a private request."); |
||||
writer.flush(); |
||||
writer.close(); |
||||
} |
||||
} |
Loading…
Reference in new issue