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
1.1 KiB
38 lines
1.1 KiB
2 years ago
|
package com.fr.plugin.web.hander;
|
||
|
|
||
|
import com.fanruan.api.runtime.ResourceKit;
|
||
|
import com.fanruan.api.util.IOKit;
|
||
|
import com.fr.decision.fun.impl.BaseHttpHandler;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.plugin.utils.UserSync;
|
||
|
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.FileOutputStream;
|
||
|
|
||
|
public class LogoHandeler extends BaseHttpHandler {
|
||
|
@Override
|
||
|
public RequestMethod getMethod() {
|
||
|
return RequestMethod.GET;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getPath() {
|
||
|
return "/ytlogo";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean isPublic() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||
|
httpServletResponse.setContentType("image/png");
|
||
|
IOKit.copyBinaryTo(LogoHandeler.class.getResourceAsStream("/com/fr/plugin/web/images/log.jpg"), httpServletResponse.getOutputStream());
|
||
|
}
|
||
|
}
|
||
|
|