diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/config/ConfigurerAdapter.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/config/ConfigurerAdapter.java new file mode 100644 index 00000000..392f9ef0 --- /dev/null +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/config/ConfigurerAdapter.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.nl.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * WebMvcConfigurer + * + * @author Zheng Jie + * @date 2018-11-30 + */ +@Configuration +@EnableWebMvc +public class ConfigurerAdapter implements WebMvcConfigurer { + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + config.addAllowedOrigin("*"); + config.addAllowedHeader("*"); + config.addAllowedMethod("*"); + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } +} diff --git a/wms_pro/qd/src/layout/components/Sidebar/Logo.vue b/wms_pro/qd/src/layout/components/Sidebar/Logo.vue index ba96c841..8c127dfe 100644 --- a/wms_pro/qd/src/layout/components/Sidebar/Logo.vue +++ b/wms_pro/qd/src/layout/components/Sidebar/Logo.vue @@ -2,11 +2,11 @@