mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
upgrade sentinel to 1.6.3 & sync code in edgware
This commit is contained in:
parent
5ea274cfad
commit
1bf1c95247
@ -17,7 +17,7 @@
|
||||
<description>Spring Cloud Alibaba Dependencies</description>
|
||||
|
||||
<properties>
|
||||
<sentinel.version>1.6.2</sentinel.version>
|
||||
<sentinel.version>1.6.3</sentinel.version>
|
||||
<oss.version>3.1.0</oss.version>
|
||||
<seata.version>0.7.1</seata.version>
|
||||
<nacos.version>1.1.1</nacos.version>
|
||||
|
@ -175,6 +175,7 @@ public class SentinelAutoConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SentinelDataSourceHandler sentinelDataSourceHandler(
|
||||
DefaultListableBeanFactory beanFactory, SentinelProperties sentinelProperties,
|
||||
Environment env) {
|
||||
|
@ -25,7 +25,7 @@ import feign.MethodMetadata;
|
||||
|
||||
/**
|
||||
*
|
||||
* Using static field {@link SentinelContractHolder#metadataMap} to hold
|
||||
* Using static field {@link SentinelContractHolder#METADATA_MAP} to hold
|
||||
* {@link MethodMetadata} data
|
||||
*
|
||||
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
||||
@ -38,7 +38,7 @@ public class SentinelContractHolder implements Contract {
|
||||
* map key is constructed by ClassFullName + configKey. configKey is constructed by
|
||||
* {@link feign.Feign#configKey}
|
||||
*/
|
||||
public final static Map<String, MethodMetadata> metadataMap = new HashMap();
|
||||
public final static Map<String, MethodMetadata> METADATA_MAP = new HashMap();
|
||||
|
||||
public SentinelContractHolder(Contract delegate) {
|
||||
this.delegate = delegate;
|
||||
@ -48,7 +48,7 @@ public class SentinelContractHolder implements Contract {
|
||||
public List<MethodMetadata> parseAndValidatateMetadata(Class<?> targetType) {
|
||||
List<MethodMetadata> metadatas = delegate.parseAndValidatateMetadata(targetType);
|
||||
for (MethodMetadata metadata : metadatas) {
|
||||
metadataMap.put(targetType.getName() + metadata.configKey(), metadata);
|
||||
METADATA_MAP.put(targetType.getName() + metadata.configKey(), metadata);
|
||||
}
|
||||
return metadatas;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class SentinelInvocationHandler implements InvocationHandler {
|
||||
// only handle by HardCodedTarget
|
||||
if (target instanceof Target.HardCodedTarget) {
|
||||
Target.HardCodedTarget hardCodedTarget = (Target.HardCodedTarget) target;
|
||||
MethodMetadata methodMetadata = SentinelContractHolder.metadataMap
|
||||
MethodMetadata methodMetadata = SentinelContractHolder.METADATA_MAP
|
||||
.get(hardCodedTarget.type().getName()
|
||||
+ Feign.configKey(hardCodedTarget.type(), method));
|
||||
if (methodMetadata == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user