Springboot2.0配置请求服务代理
注:下图内容源自博客https://blog.csdn.net/wohaqiyi/article/details/81327512该博主版本为2.0以下
借鉴方法思路实现功能发现org.springframework.boot.bind这个包早已删掉,
org.springframework.boot.bind.RelaxedPropertyResolver;
具体解决办法如下:
package com.siyeto.cweb.common.configuration;
import java.io.IOException;
import java.util.Properties;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.boot.context.properties.bind.BindResult;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean