Commit c3cc61fa by qiuweili123

add autoconfig

parent e9eec4b4
package com.secoo.mall.openfeign.config;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FeignConfig {
// TODO: 2019/5/8 实现enable package自动加载 实现灰度发布 client请求日志拦截
@EnableFeignClients("com.secoo.mall")
public class MatrixFeignAutoConfiguration {
}
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.secoo.mall.openfeign.config.MatrixFeignAutoConfiguration
\ No newline at end of file
......@@ -5,6 +5,7 @@ import com.secoo.mall.common.core.condition.ProdEnvCondition;
import com.secoo.mall.dubbo.swagger.annotations.EnableDubboSwagger;
import com.secoo.mall.web.annotation.ApiController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
......@@ -22,8 +23,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@EnableSwaggerBootstrapUI
@EnableDubboSwagger
@Conditional(ProdEnvCondition.class)
public class SwaggerConfig {
@ConditionalOnClass(ProdEnvCondition.class)
public class MatrixSwaggerAutoConfiguration {
@Value("${spring.application.name}")
private String appName;
......
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.secoo.mall.common.config.MatrixSwaggerAutoConfiguration
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment