Commit e7bddb60 by Nepxion

重构类结构

parent c0349d93
......@@ -25,7 +25,7 @@ import com.nepxion.discovery.plugin.strategy.extension.service.constant.ServiceS
@AutoConfigureBefore(RibbonClientConfiguration.class)
@ConditionalOnProperty(value = StrategyConstant.SPRING_APPLICATION_STRATEGY_CONTROL_ENABLED, matchIfMissing = true)
public class ServiceStrategyAutoConfiguration {
@Value("${" + ServiceStrategyConstant.SPRING_APPLICATION_STRATEGY_SCAN_PACKAGES + ":}")
@Value("${" + ServiceStrategyConstant.SPRING_APPLICATION_STRATEGY_BUSINESS_SCAN_PACKAGES + ":}")
private String scanPackages;
@Bean
......
......@@ -11,7 +11,7 @@ package com.nepxion.discovery.plugin.strategy.extension.service.constant;
public class ServiceStrategyConstant {
public static final String SPRING_APPLICATION_STRATEGY_BUSINESS_CONTEXT_CONTROL_ENABLED = "spring.application.strategy.business.context.control.enabled";
public static final String SPRING_APPLICATION_STRATEGY_SCAN_PACKAGES = "spring.application.strategy.scan.packages";
public static final String SPRING_APPLICATION_STRATEGY_BUSINESS_SCAN_PACKAGES = "spring.application.strategy.business.scan.packages";
public static final String CLASS = "class";
public static final String METHOD = "method";
public static final String PARAMETER_MAP = "parameterMap";
......
......@@ -36,7 +36,7 @@ spring.application.config.rest.control.enabled=true
# 规则文件的格式,支持xml和json。缺失则默认为xml
spring.application.config.format=xml
# spring.application.config.format=json
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
spring.application.config.path=classpath:rule.xml
# spring.application.config.path=classpath:rule.json
# 为微服务归类的Key,一般通过group字段来归类,例如eureka.instance.metadataMap.group=xxx-group或者eureka.instance.metadataMap.application=xxx-application。缺失则默认为group
......@@ -44,12 +44,8 @@ spring.application.config.path=classpath:rule.xml
# spring.application.group.key=application
# Plugin strategy config
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据(例如用户根据业务参数的不同,负载均衡到不同的服务器)有关两种,该功能只支持服务,不支持网关。缺失则默认为true
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据有关(例如用户根据业务参数的不同,负载均衡到不同的服务器)。缺失则默认为true
spring.application.strategy.control.enabled=true
# 开启和关闭用户自定义和编程灰度路由策略的业务有关性的控制。一旦关闭,从业务接口无法把数据传递到上下文对象(StrategyContext);一旦开启,需要设置下面的scan.packages。缺失则默认为true
spring.application.strategy.business.context.control.enabled=true
# 用户自定义和编程灰度路由策略的时候,需要指定对业务Controller类的扫描路径,以便传递上下文对象
spring.application.strategy.business.scan.packages=com.nepxion.discovery.plugin.example.feign
# Swagger config
swagger.service.base.package=com.nepxion.discovery.plugin.admincenter.endpoint
......
......@@ -46,13 +46,13 @@
<dependency>
<groupId>com.nepxion</groupId>
<artifactId>discovery-plugin-strategy-extension-service</artifactId>
<artifactId>discovery-plugin-config-center-extension-nacos</artifactId>
<version>${discovery.plugin.version}</version>
</dependency>
<dependency>
<groupId>com.nepxion</groupId>
<artifactId>discovery-plugin-config-center-extension-nacos</artifactId>
<artifactId>discovery-plugin-strategy-extension-service</artifactId>
<version>${discovery.plugin.version}</version>
</dependency>
......
......@@ -36,7 +36,7 @@ spring.application.config.rest.control.enabled=true
# 规则文件的格式,支持xml和json。缺失则默认为xml
spring.application.config.format=xml
# spring.application.config.format=json
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
spring.application.config.path=classpath:rule.xml
# spring.application.config.path=classpath:rule.json
# 为微服务归类的Key,一般通过group字段来归类,例如eureka.instance.metadataMap.group=xxx-group或者eureka.instance.metadataMap.application=xxx-application。缺失则默认为group
......@@ -44,12 +44,12 @@ spring.application.config.path=classpath:rule.xml
# spring.application.group.key=application
# Plugin strategy config
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据(例如用户根据业务参数的不同,负载均衡到不同的服务器)有关两种,该功能只支持服务,不支持网关。缺失则默认为true
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据有关(例如用户根据业务参数的不同,负载均衡到不同的服务器)。缺失则默认为true
spring.application.strategy.control.enabled=true
# 开启和关闭用户自定义和编程灰度路由策略的业务有关性的控制。一旦关闭,从业务接口无法把数据传递到上下文对象(StrategyContext);一旦开启,需要设置下面的scan.packages。缺失则默认为true
# 开启和关闭用户自定义和编程灰度路由策略的业务有关性的控制(该设置只对服务有效,对网关无效)。一旦关闭,从业务接口无法把数据传递到上下文对象(StrategyContext);一旦开启,需要设置下面的scan.packages。缺失则默认为true
spring.application.strategy.business.context.control.enabled=true
# 用户自定义和编程灰度路由策略的时候,需要指定对业务Controller类的扫描路径,以便传递上下文对象
spring.application.strategy.business.scan.packages=com.nepxion.discovery.plugin.example.feign
spring.application.strategy.business.scan.packages=com.nepxion.discovery.plugin.example.service.feign
# Swagger config
swagger.service.base.package=com.nepxion.discovery.plugin.admincenter.endpoint
......
......@@ -46,13 +46,13 @@
<dependency>
<groupId>com.nepxion</groupId>
<artifactId>discovery-plugin-strategy-extension-service</artifactId>
<artifactId>discovery-plugin-config-center-extension-nacos</artifactId>
<version>${discovery.plugin.version}</version>
</dependency>
<dependency>
<groupId>com.nepxion</groupId>
<artifactId>discovery-plugin-config-center-extension-nacos</artifactId>
<artifactId>discovery-plugin-strategy-extension-service</artifactId>
<version>${discovery.plugin.version}</version>
</dependency>
......
......@@ -36,7 +36,7 @@ spring.application.config.rest.control.enabled=true
# 规则文件的格式,支持xml和json。缺失则默认为xml
spring.application.config.format=xml
# spring.application.config.format=json
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
# 本地规则文件的路径,支持两种方式:classpath:rule.xml(rule.json) - 规则文件放在resources目录下,便于打包进jar;file:rule.xml(rule.json) - 规则文件放在工程根目录下,放置在外部便于修改。缺失则默认为不装载本地规则
spring.application.config.path=classpath:rule.xml
# spring.application.config.path=classpath:rule.json
# 为微服务归类的Key,一般通过group字段来归类,例如eureka.instance.metadataMap.group=xxx-group或者eureka.instance.metadataMap.application=xxx-application。缺失则默认为group
......@@ -44,12 +44,8 @@ spring.application.config.path=classpath:rule.xml
# spring.application.group.key=application
# Plugin strategy config
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据(例如用户根据业务参数的不同,负载均衡到不同的服务器)有关两种,该功能只支持服务,不支持网关。缺失则默认为true
# 开启和关闭用户自定义和编程灰度路由策略的控制,包括跟业务无关(例如:不允许某个服务器的IP地址或者某个版本被负载均衡到)和业务数据有关(例如用户根据业务参数的不同,负载均衡到不同的服务器)。缺失则默认为true
spring.application.strategy.control.enabled=true
# 开启和关闭用户自定义和编程灰度路由策略的业务有关性的控制。一旦关闭,从业务接口无法把数据传递到上下文对象(StrategyContext);一旦开启,需要设置下面的scan.packages。缺失则默认为true
spring.application.strategy.business.context.control.enabled=true
# 用户自定义和编程灰度路由策略的时候,需要指定对业务Controller类的扫描路径,以便传递上下文对象
spring.application.strategy.business.scan.packages=com.nepxion.discovery.plugin.example.feign
# Swagger config
swagger.service.base.package=com.nepxion.discovery.plugin.admincenter.endpoint
......
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