一、拦截机制的不同 Struts2是类级别的拦截,每次请求就会创建一个Action,和Spring整合时Struts2的ActionBean注入作用域是原型模式prototype,然后通过setter,getter吧request数据注入到属性。Struts2中,一个Action对应一个reques ...
分类:
编程语言 时间:
2019-11-15 18:54:09
阅读次数:
84
业务要求: 需要进入页面时就要游客登陆拿到token; 之后的接口都是需要这个token; 其他操作则需要授权登陆,此时的token已失效; token过久之后会过期; 业务实现: 1.全局拦截 fly.interceptors.request.use(request => { const toke ...
分类:
微信 时间:
2019-11-12 20:11:04
阅读次数:
183
PREFIX=$HOME/usr/local # yumdownloader --source bzip2-devel rpm2cpio bzip2-1.0.6-13.el7.src.rpm | cpio -id tar zxf bzip2-1.0.6.tar.gz patch -p0 < bzip ...
分类:
其他好文 时间:
2019-11-09 21:57:46
阅读次数:
110
底层源码 doDispatch getHandler HandlerMapping类 方法返回值 ThreadController类 参数 FourthController类 ...
分类:
其他好文 时间:
2019-11-09 17:15:40
阅读次数:
83
验证登录 一、验证后端是否登录 1、在项目中的应用层文件夹下,创建一个名为utils的python package包,然后创建名为mixin_utils的py文件,文件的代码是: from django.contrib.auth.decorators import login_required fr ...
分类:
其他好文 时间:
2019-11-08 12:37:46
阅读次数:
451
1、下载Navicat Premium 官网https://www.navicat.com.cn/下载最新版本下载安装(文末,网盘地址有64位安装包和注册机下载) 2、激活Navicat Premium 下载激活软件, 无需断网运行激活软件Navicat_Keygen_Patch(以管理员身份运行) ...
分类:
其他好文 时间:
2019-11-06 01:15:42
阅读次数:
391
@RequestParam 用来处理请求头Content-Type: 为 application/x-www-form-urlencoded编码的内容。(Http协议中,如果不指定Content-Type,则默认传递的参数就是application/x-www-form-urlencoded类型) ...
分类:
其他好文 时间:
2019-11-05 00:43:26
阅读次数:
65
Before we publish our package, we want to make sure everything is set up correctly. We’ll cover versioning, preparing our package, adding a proper REA ...
分类:
其他好文 时间:
2019-11-04 17:31:37
阅读次数:
63
Python 移植教程 使用的源文件需要自行从网上下载。 准备文件: Python-2.7.13.tgz sqlite-autoconf-3200100.tar.gz Python-2.7.13-xcompile.patch.tar.gz ———————————————— 步骤1、准备环境 tar ...
分类:
编程语言 时间:
2019-11-01 16:45:34
阅读次数:
88
import geventfrom gevent import monkeyimport timeimport random# 有耗时操作时需要monkey.patch_all() # 将程序中用到的耗时操作代码,换为 gevent 中自己实现的模块def work(name): for i in ...
分类:
编程语言 时间:
2019-11-01 11:15:07
阅读次数:
91