如果你使用webjars的方式引入bootstrap和jQuery,在html中使用
th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}
这种方式来引入,那你还需要在配置中添加
map.put("/webjars/**","anon");
webjars才会被放行,相信其中的原理大家都知道了
如果你使用webjars的方式引入bootstrap和jQuery,在html中使用
th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}
这种方式来引入,那你还需要在配置中添加
map.put("/webjars/**","anon");
webjars才会被放行,相信其中的原理大家都知道了