|
@@ -20,8 +20,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
*
|
|
|
*/
|
|
|
@SpringBootApplication
|
|
|
-@EnableEurekaClient
|
|
|
-@EnableFeignClients
|
|
|
+//@EnableEurekaClient
|
|
|
+//@EnableFeignClients
|
|
|
@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
|
|
|
public class App {
|
|
|
|
|
@@ -42,20 +42,4 @@ public class App {
|
|
|
resolver.setMaxUploadSize(200*1024*1024);//上传文件大小 50M 50*1024*1024
|
|
|
return resolver;
|
|
|
}
|
|
|
-
|
|
|
- @Bean
|
|
|
- public WebMvcConfigurer corsConfigurer() {
|
|
|
- return new WebMvcConfigurerAdapter() {
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
- registry.addMapping("/**");
|
|
|
-
|
|
|
-// registry.addMapping("/**")
|
|
|
-// .allowedOrigins("*")
|
|
|
-// .allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE")
|
|
|
-// .allowedHeaders("*")
|
|
|
-// .exposedHeaders("access_token", "credentials", "refresh_token")
|
|
|
-// .allowCredentials(true).maxAge(3600);
|
|
|
- }
|
|
|
- };
|
|
|
- }
|
|
|
}
|