|
@@ -4,8 +4,8 @@ import org.mybatis.spring.annotation.MapperScan;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
|
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
|
|
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
|
+import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author: guq
|
|
* @author: guq
|
|
@@ -14,16 +14,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
@SpringBootApplication
|
|
@SpringBootApplication
|
|
|
@MapperScan("com.usoftchina.saas.sale.mapper")
|
|
@MapperScan("com.usoftchina.saas.sale.mapper")
|
|
|
@EnableEurekaClient
|
|
@EnableEurekaClient
|
|
|
-public class SaleApplication extends WebMvcConfigurerAdapter{
|
|
|
|
|
|
|
+@EnableFeignClients("com.usoftchina.saas")
|
|
|
|
|
+public class SaleApplication{
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(SaleApplication.class, args);
|
|
SpringApplication.run(SaleApplication.class, args);
|
|
|
}
|
|
}
|
|
|
- @Override
|
|
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
|
|
- registry.addMapping("/**")
|
|
|
|
|
- .allowCredentials(true)
|
|
|
|
|
- .allowedHeaders("*")
|
|
|
|
|
- .allowedOrigins("*")
|
|
|
|
|
- .allowedMethods("*");
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|