补充
This commit is contained in:
parent
e1af1adbd0
commit
3e3748f64b
8
pom.xml
8
pom.xml
@ -431,9 +431,7 @@
|
||||
<properties>
|
||||
<profiles.active>dev</profiles.active>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
|
||||
</profile>
|
||||
<!--测试环境-->
|
||||
<profile>
|
||||
@ -455,7 +453,9 @@
|
||||
<properties>
|
||||
<profiles.active>prod</profiles.active>
|
||||
</properties>
|
||||
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
@ -36,18 +36,18 @@ public class MvcConfig implements WebMvcConfigurer {
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addCorsMappings(CorsRegistry registry) {
|
||||
// registry.addMapping("/**") // 匹配所有的路径
|
||||
// .allowCredentials(true) // 设置允许凭证
|
||||
// .allowedHeaders("*") // 设置请求头
|
||||
// .allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
||||
// .allowedOriginPatterns("*");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
// configurer
|
||||
// .addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
||||
// }
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**") // 匹配所有的路径
|
||||
.allowCredentials(true) // 设置允许凭证
|
||||
.allowedHeaders("*") // 设置请求头
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
||||
.allowedOriginPatterns("*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
configurer
|
||||
.addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user