使用Spring-Security后,浏览器不能缓存的问题

Spring-Security在默认情况下是不允许客户端进行缓存的,在使用时可以通过禁用Spring-Security中的cacheControl配置项允许缓存。

protected void configure(HttpSecurity http) throws Exception {
        // 允许缓存配置
        http.headers().cacheControl().disable();
}

你可能感兴趣的:(#,It's,Java,spring,缓存,java,spirng,security)