|
|
@@ -6,8 +6,6 @@ import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
|
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
|
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -19,18 +17,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
@EnableEurekaClient
|
|
|
@EnableFeignClients("com.usoftchina.saas")
|
|
|
@EnableAuthClient
|
|
|
-public class SaleApplication extends WebMvcConfigurerAdapter {
|
|
|
+public class SaleApplication {
|
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(SaleApplication.class, args);
|
|
|
}
|
|
|
- @Override
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
-
|
|
|
- registry.addMapping("/**")
|
|
|
- .allowCredentials(true)
|
|
|
- .allowedHeaders("*")
|
|
|
- .allowedOrigins("*")
|
|
|
- .allowedMethods("*");
|
|
|
- }
|
|
|
|
|
|
}
|