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.
29 lines
719 B
29 lines
719 B
package com.fr.plugin.decision; |
|
|
|
import com.fr.decision.fun.impl.AbstractRequestPreHandleProvider; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
/** |
|
* Created by Zed on 2019/4/8. |
|
*/ |
|
@FunctionRecorder |
|
public class MobileH5RequestPreHandle extends AbstractRequestPreHandleProvider { |
|
|
|
@Override |
|
public boolean accept(HttpServletRequest req) { |
|
return true; |
|
} |
|
|
|
@Override |
|
public boolean preHandle(HttpServletRequest req, HttpServletResponse res) { |
|
try { |
|
res.sendRedirect("https://git.fanruan.com"); |
|
} catch (Exception ignore) { |
|
} |
|
|
|
return false; |
|
} |
|
}
|
|
|