方法1
@bp.before_request
def test():
print("test")
方法2
def bp_before_request():
print(test)
bp.before_request(bp_before_request)
https://stackoverflow.com/questions/13657711/where-do-i-put-my-blueprint-before-request