bl bl bl bl bl
package com.dh.activiti; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; public class ProcessInterceptor implements HandlerInterceptor { @Override
public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { httpServletResponse.setHeader("Access-Control-Allow-Origin", "*"); httpServletResponse.setHeader("Access-Control-Allow-Headers", "Content-Type,Content-Length, Authorization, Accept,X-Requested-With"); httpServletResponse.setHeader("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS"); httpServletResponse.setHeader("X-Powered-By","Jetty"); String method= httpServletRequest.getMethod(); if (method.equals("OPTIONS")){
httpServletResponse.setStatus(200);
return false;
} System.out.println(method); return true;
} @Override
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { } @Override
public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { }
}
package com.dh.activiti; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration
public class MyWebAppConfigurer extends WebMvcConfigurerAdapter { @Bean //把我们的拦截器注入为bean
public HandlerInterceptor getMyInterceptor(){
return new ProcessInterceptor();
} @Override
public void addInterceptors(InterceptorRegistry registry) {
// addPathPatterns 用于添加拦截规则, 这里假设拦截 /url 后面的全部链接
// excludePathPatterns 用户排除拦截
registry.addInterceptor(getMyInterceptor()).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
package com.dh.activiti; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration
public class MyWebAppConfigurer extends WebMvcConfigurerAdapter { @Bean //把我们的拦截器注入为bean
public HandlerInterceptor getMyInterceptor(){
return new ProcessInterceptor();
} @Override
public void addInterceptors(InterceptorRegistry registry) {
// addPathPatterns 用于添加拦截规则, 这里假设拦截 /url 后面的全部链接
// excludePathPatterns 用户排除拦截
registry.addInterceptor(getMyInterceptor()).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
package com.dh.activiti; import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse;
import java.util.Map; /**
* Created by Administrator on 2018/6/17.
*/
@RestController
public class ActivityConsumerServiceImpl { @RequestMapping(value = "/startActivityDemo", method = RequestMethod.POST)
public boolean startActivityDemo(@RequestBody Map<String,Object> map, HttpServletResponse response) {
// response.setHeader("Access-Control-Allow-Origin","127.0.0.1:8020");
System.out.println(JSON.toJSONString(map));
TestEntity testEntity = JSON.parseObject(JSON.toJSONString(map),TestEntity.class);
System.out.println(JSON.toJSONString(testEntity));
return false;
} }
bl bl bl bl bl的更多相关文章
- 汇编指令-位置无关码(BL)与绝对位置码(LDR)(2)
位置无关码,即该段代码无论放在内存的哪个地址,都能正确运行.究其原因,是因为代码里没有使用绝对地址,都是相对地址. 位置相关码,即它的地址与代码处于的位置相关,是绝对地址 BL :带链接分支跳转指令 ...
- 科普一下bl锁的知识,没解锁的必看!
今天给大家科普一下. 科普分为两版,一个详细版一个简单版.简单版往下翻. bl是什么?其实详细的我也不知道,我就知道原理和他的全称是bootloader.我们所说的解锁里面的“锁”,就是blbl锁的功 ...
- windbg-bp、 bm、 bu、 bl、 bc、 ba(断点、硬件断点)
bp bp 命令是在某个地址下断点, 可以 bp 0x7783FEB 也可以 bp MyApp!SomeFunction . 对于后者,WinDBG 会自动找到MyApp!SomeFunction 对 ...
- 使用B或BL跳转时,下一条指令的地址是这样计算的
B跳转指令:它是个相对跳转指令,其机器码格式如下: [31:28]位是条件码:[27:24]位为“1010”(0xeaffffff)时,表示B跳转指令,为“1011”时,表示BL跳转指令:[23:0] ...
- PIT,BL,AP,CP,CSC
使用ODIN刷机的时候,要选择ROM文件,以下是5件套各部分的说明: PIT:分区信息,如果没有更换ROM,一般不需要刷,也不需要勾选re-partition选项 BL:bootloader,引导信息 ...
- 谷歌pixel手机解BL锁、刷机、破解电信(史上最详细的帖子)
本文根据网上已有内容进行整理,对每一个步骤都进行了实践,运气爆棚,几乎没有出现什么重大错误,小错误也进行了很好地解决.因此,十分感激那些为折腾google pixel的IT爱好者,为我提供了无穷的帮助 ...
- Windbg命令学习15(bp bm bu bl bc ba断点)
以下以skinhgy为例,windbg附加运行 1. bp 命令是在某个地址下断点, 可以 bp 0x7783FEB 也可以 bp MyApp!SomeFunction . 对于后者,WinDBG 会 ...
- S3C2440的七种模式之——未定义模式(去掉bl print1 bug解决)
现在做第一个实验,模拟未定义模式. 未定义模式,是cpu遇到自己不能识别的指令时候做出的异常处理. arm指令的机器码一定是按照某种规范要求的,不然你随意写一条指令,cpu不是都可以执行吗?在cpu没 ...
- 关于ARM的B,BL跳转指令
.text:00001260 A3 04 00 EB BL sub_24F4 当前地址+ (偏移 << 2 + 8) = ...
- arm B和BL指令浅析
arm B和BL指令浅析 B或BL指令引起处理器转移到“子程序名”处开始执行.两者的不同之处在于:(1)BL指令在转移到子程序执行之前,将其下一条指令的地址拷贝到R14(LR,链接寄存器). ...
随机推荐
- Linux使用scp命令进行文件远程拷贝详解
前言 scp是 secure copy的缩写, scp是Linux系统下基于ssh登陆进行安全的远程文件拷贝命令.Linux的scp命令可以在Linux服务器之间复制文件和目录. 使用语法: scp ...
- 【Mac】解决「另一个活跃的 Homebrew 进程正在进行中」问题
问题描述 在安装 tesseract 的语言包时,由于网络下载速度太慢,我按下 ctrl + z 退出了安装,当再次输入安装命令时,系统报错如下: 解决方法 使用以下命令删除 homebrew 进程锁 ...
- scala (6) Map
在scala中Map分为可变长(mutable)和不可变长(imtable) /** * 不可变长map 长度一旦初始化,就不能在进行更改 */ // 通过对偶元组的方式创建map val map = ...
- python 位运算【实测】
python 位运算符为 << 左移,>> 右移 3<<2 既 3 的二进制整体向左移两位 : : 可以这么算 3*(2的2次方)= 12 11>> ...
- IDL返回众数(数组中出现次数最多的值)
对于整型数组,可以直接利用histogram函数可以实现,示例如下: IDL>array = [1, 1, 2 , 4, 1, 3, 3, 2, 4, 5, 3, 2, 2, 1, 2, 6, ...
- 20155232 实验二《Java面向对象程序设计》实验报告
20155232 实验一<Java面向对象程序设计>实验报告 实验内容 1.初步掌握单元测试和TDD 2.理解并掌握面向对象三要素:封装.继承.多态 3.初步掌握UML建模 4.熟悉S.O ...
- Ubuntu + apache + Mysql +php
发生了乱码问题: 打开apache配置文件: sudo gedit /etc/apache2/apache2.conf,在最后面加上:AddDefaultCharset UTF-8,如果还乱码,再将U ...
- 《图说VR入门》——googleVR入门代码分析
本文章由cartzhang编写,转载请注明出处. 所有权利保留. 文章链接:http://blog.csdn.net/cartzhang/article/details/53013843 作者:car ...
- python简介、第一个python程序、变量、字符编码、用户交互程序、if...else、while、for
也愿大家永葆初心-- 已识乾坤大,犹怜草木青. 一.python简介 首先,我们普及一下编程语言的基础知识.用任何编程语言来开发程序,都是为了让计算机干活,比如下载一个MP3,编写一个文档等等,而计算 ...
- 第六篇 native 版本的Postman如何通过代理服务器录制Web及手机APP请求
第四篇主要介绍了chrome app版本的postman如何安装及如何录制Web脚本,比较简单. 但是chrome app 版本和native 版本相比,对应chrome app 版本官方已经放弃支持 ...