|
|
@@ -5,21 +5,21 @@ import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.reactive.config.CorsRegistry;
|
|
|
import org.springframework.web.reactive.config.WebFluxConfigurer;
|
|
|
|
|
|
-@Configuration
|
|
|
-public class MyWebConfiguration {
|
|
|
-
|
|
|
- //配置底层
|
|
|
- @Bean
|
|
|
- public WebFluxConfigurer webFluxConfigurer(){
|
|
|
-
|
|
|
- return new WebFluxConfigurer() {
|
|
|
- @Override
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
- registry.addMapping("/**")
|
|
|
- .allowedHeaders("*")
|
|
|
- .allowedMethods("*")
|
|
|
- .allowedOrigins("localhost");
|
|
|
- }
|
|
|
- };
|
|
|
- }
|
|
|
-}
|
|
|
+//@Configuration
|
|
|
+//public class MyWebConfiguration {
|
|
|
+//
|
|
|
+// //配置底层
|
|
|
+// @Bean
|
|
|
+// public WebFluxConfigurer webFluxConfigurer(){
|
|
|
+//
|
|
|
+// return new WebFluxConfigurer() {
|
|
|
+// @Override
|
|
|
+// public void addCorsMappings(CorsRegistry registry) {
|
|
|
+// registry.addMapping("/**")
|
|
|
+// .allowedHeaders("*")
|
|
|
+// .allowedMethods("*")
|
|
|
+// .allowedOrigins("localhost");
|
|
|
+// }
|
|
|
+// };
|
|
|
+// }
|
|
|
+//}
|