Commit 780da420 authored by 钱坤's avatar 钱坤

1修正cros的配置;

2开启apollo动态刷新
parent 9f2cc7f2
...@@ -15,11 +15,11 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -15,11 +15,11 @@ public class WebConfig implements WebMvcConfigurer {
@Autowired @Autowired
private FaLoginIntercept faLoginIntercept; private FaLoginIntercept faLoginIntercept;
@Override // @Override
public void addCorsMappings(CorsRegistry registry) { // public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/product/**") // registry.addMapping("/product/**")
.allowedOrigins("*"); // .allowedOrigins("*");
} // }
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
......
...@@ -14,12 +14,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; ...@@ -14,12 +14,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent; import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.util.Set; import java.util.Set;
/*动态刷新日志参数配置*/ /*动态刷新日志参数配置*/
// @Component @Component
@Slf4j @Slf4j
@ConditionalOnProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED) @ConditionalOnProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED)
@AutoConfigureAfter(ApolloAutoConfiguration.class) @AutoConfigureAfter(ApolloAutoConfiguration.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment