调整
This commit is contained in:
parent
e74ceaebd0
commit
68b1879793
@ -36,18 +36,18 @@ public class MvcConfig implements WebMvcConfigurer {
|
|||||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
// registry.addMapping("/**") // 匹配所有的路径
|
registry.addMapping("/**") // 匹配所有的路径
|
||||||
// .allowCredentials(true) // 设置允许凭证
|
.allowCredentials(true) // 设置允许凭证
|
||||||
// .allowedHeaders("*") // 设置请求头
|
.allowedHeaders("*") // 设置请求头
|
||||||
// .allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
.allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
||||||
// .allowedOriginPatterns("*");
|
.allowedOriginPatterns("*");
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public void configurePathMatch(PathMatchConfigurer configurer) {
|
public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||||
// configurer
|
configurer
|
||||||
// .addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
.addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user