新增docker一键部署方案

This commit is contained in:
朱耘稷
2021-01-07 12:36:36 +08:00
parent e4c2e9906a
commit 444fe6baaf
8 changed files with 273 additions and 6 deletions

View File

@ -43,7 +43,12 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
config.addAllowedHeader("*");// #允许访问的头信息,*表示全部
config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
config.addAllowedMethod("OPTIONS");// 允许提交请求的方法类型,*表示全部允许
config.addAllowedMethod("HEAD");
config.addAllowedMethod("GET");
config.addAllowedMethod("PUT");
config.addAllowedMethod("POST");
config.addAllowedMethod("DELETE");
config.addAllowedMethod("PATCH");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}