This commit is contained in:
pengjie 2025-08-16 11:22:04 +08:00
parent 8fd085c94d
commit b7d4c90262
2 changed files with 18 additions and 18 deletions

View File

@ -431,9 +431,7 @@
<properties> <properties>
<profiles.active>dev</profiles.active> <profiles.active>dev</profiles.active>
</properties> </properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile> </profile>
<!--测试环境--> <!--测试环境-->
<profile> <profile>
@ -455,7 +453,9 @@
<properties> <properties>
<profiles.active>prod</profiles.active> <profiles.active>prod</profiles.active>
</properties> </properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile> </profile>
</profiles> </profiles>

View File

@ -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));
// } }
} }