Bladeren bron

feat : 修改本地的Nacos命名空间, 跟测试环境区分开

bilingfeng 2 jaren geleden
bovenliggende
commit
65536aa12b

+ 0 - 31
game-module/game-manage/src/main/java/com/zanxiang/manage/config/CORSConfig.java

@@ -1,31 +0,0 @@
-//package com.zanxiang.manage.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;
-//
-///**
-// * @author : lingfeng
-// * @time : 2022-06-16
-// * @description : 跨域配置
-// */
-//@Configuration
-//public class CORSConfig {
-//
-//    private CorsConfiguration buildConfig() {
-//        CorsConfiguration corsConfiguration = new CorsConfiguration();
-//        corsConfiguration.addAllowedOrigin("*");
-//        corsConfiguration.addAllowedHeader("*");
-//        corsConfiguration.addAllowedMethod("*");
-//        return corsConfiguration;
-//    }
-//
-//    @Bean
-//    public CorsFilter corsFilter() {
-//        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
-//        source.registerCorsConfiguration("/**", buildConfig());
-//        return new CorsFilter(source);
-//    }
-//}

+ 0 - 32
game-module/game-manage/src/main/java/com/zanxiang/manage/filter/CORSFilter.java

@@ -1,32 +0,0 @@
-//package com.zanxiang.manage.filter;
-//
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.servlet.*;
-//import javax.servlet.annotation.WebFilter;
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import java.io.IOException;
-//
-///**
-// * @author : lingfeng
-// * @time : 2022-06-16
-// * @description : 过滤器
-// */
-//@WebFilter(filterName = "CorsFilter ")
-//@Configuration
-//public class CORSFilter implements Filter {
-//
-//    @Override
-//    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
-//        HttpServletResponse response = (HttpServletResponse) res;
-//        HttpServletRequest request = (HttpServletRequest) req;
-//        response.setHeader("Access-Control-Allow-Origin", request.getHeader("origin"));
-//        response.setHeader("Access-Control-Allow-Credentials", "true");
-//        response.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT, OPTION");
-//        response.setHeader("Access-Control-Max-Age", "3600");
-//        response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, cookie, token, Authorization");
-//        chain.doFilter(req, res);
-//    }
-//
-//}

+ 1 - 1
game-module/game-manage/src/main/resources/bootstrap.yml

@@ -9,7 +9,7 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: DEV_game
+        namespace: LOCAL_game
         # 服务注册地址
         server-addr: 118.178.187.109:8848
       config: