|
|
@@ -1,14 +1,12 @@
|
|
|
package com.usoftchina.saas.purchase;
|
|
|
|
|
|
-import com.usoftchina.saas.auth.client.EnableAuthClient;
|
|
|
+
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
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.transaction.annotation.EnableTransactionManagement;
|
|
|
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
/**
|
|
|
* @author yingp
|
|
|
@@ -20,17 +18,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
@EnableFeignClients("com.usoftchina.saas")
|
|
|
//@EnableAuthClient
|
|
|
@MapperScan("com.usoftchina.saas.purchase.mapper")
|
|
|
-public class PurchaseApplication extends WebMvcConfigurerAdapter {
|
|
|
+public class PurchaseApplication {
|
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(PurchaseApplication.class, args);
|
|
|
}
|
|
|
- @Override
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
-
|
|
|
- registry.addMapping("/**")
|
|
|
- .allowCredentials(true)
|
|
|
- .allowedHeaders("*")
|
|
|
- .allowedOrigins("*")
|
|
|
- .allowedMethods("*");
|
|
|
- }
|
|
|
}
|