VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 编程开发 > Java教程 >
  • springboot 跨域配置类

复制代码
ackage org.fh.config;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Component;

/**
 * 说明:跨域访问处理

 * 作者:FH Admin
 * from:fhadmin.cn
 */
@Component
public class CORSFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
            throws IOException, ServletException {

        HttpServletRequest request = (HttpServletRequest) servletRequest;
        HttpServletResponse response = (HttpServletResponse) servletResponse;
        response.setContentType("textml;charset=UTF-8");
        response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
        response.setHeader("Access-Control-Max-Age", "0");
        response.setHeader("Access-Control-Allow-Headers","Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token");
        response.setHeader("Access-Control-Allow-Credentials", "true"); // 是否支持cookie跨域        
        response.setHeader("XDomainRequestAllowed", "1");
        filterChain.doFilter(servletRequest, servletResponse);

    }

    @Override
    public void destroy() {

    }
}
 
复制代码

1.模型管理 :web在线流程设计器、导入导出xml、复制流程、部署流程

2.流程管理 :导入导出流程资源文件、查看流程图、根据流程实例反射出流程模型、激活挂起

3.运行中流程:查看流程信息、当前任务节点、当前流程图、作废暂停流程、指派待办人、自由跳转

4.历史的流程:查看流程信息、流程用时、流程状态、查看任务发起人信息

5.待办任务 :查看本人个人任务以及本角色下的任务、办理、驳回、作废、指派一下代理人

6.已办任务 :查看自己办理过的任务以及流程信息、流程图、流程状态(作废 驳回 正常完成)

本文链接:https://www.cnblogs.com/m17054598469/p/15821702.html

 


相关教程