@app.before_first_request def p1(): print('start')
通过这个方法可以使定义的p1函数在所有响应产生之前执行
@app.before_request def p2(): print('p2')
通过这种方法可以使定义的p2函数在每一次请求响应之前执行