pull/1/head
tanghc 5 years ago
parent 1077f57ff6
commit 2e853bb77c
  1. 7
      sop-website/src/main/java/com/gitee/sop/websiteserver/config/WebsiteConfig.java

@ -3,6 +3,7 @@ package com.gitee.sop.websiteserver.config;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig; import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import com.gitee.sop.gatewaycommon.manager.EnvironmentContext;
import com.gitee.sop.gatewaycommon.route.EurekaRegistryListener; import com.gitee.sop.gatewaycommon.route.EurekaRegistryListener;
import com.gitee.sop.gatewaycommon.route.NacosRegistryListener; import com.gitee.sop.gatewaycommon.route.NacosRegistryListener;
import com.gitee.sop.gatewaycommon.route.RegistryListener; import com.gitee.sop.gatewaycommon.route.RegistryListener;
@ -20,6 +21,7 @@ import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
/** /**
* @author tanghc * @author tanghc
@ -33,6 +35,9 @@ public class WebsiteConfig implements ApplicationRunner {
@Autowired @Autowired
private RegistryListener registryListener; private RegistryListener registryListener;
@Autowired
private Environment environment;
/** /**
* 使用fastjson代替jackson * 使用fastjson代替jackson
* @return * @return
@ -84,6 +89,6 @@ public class WebsiteConfig implements ApplicationRunner {
*/ */
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
// docManager.load(null); EnvironmentContext.setEnvironment(environment);
} }
} }

Loading…
Cancel
Save