Compare commits
No commits in common. "be4cf7ca6951e3c9ecec0fb2d474b79283b0fac6" and "bbf47b7043bc17333a522785196243ee38a66dcd" have entirely different histories.
be4cf7ca69
...
bbf47b7043
|
|
@ -33,9 +33,4 @@ public class SystemGlobal {
|
|||
*/
|
||||
public final static String POST="POST";
|
||||
|
||||
/**
|
||||
* PUT 请求
|
||||
*/
|
||||
public final static String PUT="PUT";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,16 @@ import java.io.IOException;
|
|||
import static cn.hutool.http.Method.POST;
|
||||
import static jdk.nashorn.internal.runtime.PropertyDescriptor.GET;
|
||||
|
||||
/**
|
||||
* @author bonus
|
||||
*/
|
||||
@Component
|
||||
@WebFilter("/*")
|
||||
public class MyFilter extends OncePerRequestFilter {
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (SystemGlobal.POST.equals(request.getMethod()) || SystemGlobal.PUT.equals(request.getMethod()) ){
|
||||
if (SystemGlobal.POST.equals(request.getMethod())){
|
||||
//去除文件上传
|
||||
String header = request.getHeader(HttpHeaders.CONTENT_TYPE);
|
||||
if(StringUtils.isNotEmpty(header)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue