1. 在filterMap增加 map.put("/static/**","anon"); 2. 在yml文件中添加 spring: mvc: static-path-pattern: /static/**