|
|
@@ -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;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -18,17 +16,10 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
@MapperScan("com.usoftchina.saas.sale.mapper")
|
|
|
@EnableEurekaClient
|
|
|
@EnableFeignClients("com.usoftchina.saas")
|
|
|
-//@EnableAuthClient
|
|
|
-public class SaleApplication extends WebMvcConfigurerAdapter {
|
|
|
+@EnableAuthClient
|
|
|
+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("*");
|
|
|
- }
|
|
|
+
|
|
|
}
|