1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge pull request #26 from alibaba/master

update
This commit is contained in:
余黄彬 2020-08-13 16:41:31 +08:00 committed by GitHub
commit a50adb9b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 25 deletions

View File

@ -80,7 +80,7 @@
<properties> <properties>
<!-- Project revision --> <!-- Project revision -->
<revision>2.2.1.RELEASE</revision> <revision>2.2.2-SNAPSHOT</revision>
<!-- Dependency Versions --> <!-- Dependency Versions -->
<spring-cloud-commons.version>2.2.2.RELEASE</spring-cloud-commons.version> <spring-cloud-commons.version>2.2.2.RELEASE</spring-cloud-commons.version>
@ -98,7 +98,7 @@
<slf4j-api.version>1.7.25</slf4j-api.version> <slf4j-api.version>1.7.25</slf4j-api.version>
<!-- Apache Dubbo --> <!-- Apache Dubbo -->
<dubbo.version>2.7.6</dubbo.version> <dubbo.version>2.7.8</dubbo.version>
<curator.version>4.0.1</curator.version> <curator.version>4.0.1</curator.version>
<!-- Apache RocketMQ --> <!-- Apache RocketMQ -->

View File

@ -22,9 +22,9 @@
<sentinel.version>1.7.2</sentinel.version> <sentinel.version>1.7.2</sentinel.version>
<oss.version>3.1.0</oss.version> <oss.version>3.1.0</oss.version>
<seata.version>1.2.0</seata.version> <seata.version>1.2.0</seata.version>
<nacos.client.version>1.2.1</nacos.client.version> <nacos.client.version>1.3.2</nacos.client.version>
<nacos.config.version>0.8.0</nacos.config.version> <nacos.config.version>0.8.0</nacos.config.version>
<spring.context.support.version>1.0.6</spring.context.support.version> <spring.context.support.version>1.0.9</spring.context.support.version>
<!-- Maven Plugin Versions --> <!-- Maven Plugin Versions -->
<maven-source-plugin.version>2.2.1</maven-source-plugin.version> <maven-source-plugin.version>2.2.1</maven-source-plugin.version>

View File

@ -229,7 +229,7 @@ in develop-env enviroment; user name :nacos-config-yaml-update; age: 68
spring.profiles.active=product spring.profiles.active=product
---- ----
同时生产环境上 Nacos 需要添加对应 DataId 的基础配置。例如,在生环境下的 Naocs 添加了DataId为nacos-config-product.yaml的配置 同时生产环境上 Nacos 需要添加对应 DataId 的基础配置。例如,在生环境下的 Naocs 添加了DataId为nacos-config-product.yaml的配置
[source,subs="normal"] [source,subs="normal"]
---- ----

View File

@ -93,7 +93,7 @@ public class RedisDataSourceProperties extends AbstractDataSourceProperties {
"RedisDataSource channel can not be empty"); "RedisDataSource channel can not be empty");
} }
if (!StringUtils.isEmpty(masterId) && StringUtils.isEmpty(masterId)) { if (StringUtils.isEmpty(masterId)) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"RedisDataSource sentinel modelmasterId can not be empty"); "RedisDataSource sentinel modelmasterId can not be empty");
} }

View File

@ -22,7 +22,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Properties; import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -487,8 +486,7 @@ public class NacosConfigProperties {
List<Config> result = new ArrayList<>(); List<Config> result = new ArrayList<>();
configList.stream() configList.stream()
.collect(Collectors.groupingBy(cfg -> (cfg.getGroup() + cfg.getDataId()), .collect(Collectors.groupingBy(cfg -> (cfg.getGroup() + cfg.getDataId()),
() -> new ConcurrentHashMap<>(new LinkedHashMap<>()), LinkedHashMap::new, Collectors.toList()))
Collectors.toList()))
.forEach((key, list) -> { .forEach((key, list) -> {
list.stream() list.stream()
.reduce((a, b) -> new Config(a.getDataId(), a.getGroup(), .reduce((a, b) -> new Config(a.getDataId(), a.getGroup(),

View File

@ -74,7 +74,7 @@ public class NacosWatch implements ApplicationEventPublisherAware, SmartLifecycl
private static ThreadPoolTaskScheduler getTaskScheduler() { private static ThreadPoolTaskScheduler getTaskScheduler() {
ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setBeanName("Nacso-Watch-Task-Scheduler"); taskScheduler.setBeanName("Nacos-Watch-Task-Scheduler");
taskScheduler.initialize(); taskScheduler.initialize();
return taskScheduler; return taskScheduler;
} }

View File

@ -328,4 +328,9 @@ public class MockNamingService implements NamingService {
return null; return null;
} }
@Override
public void shutDown() throws NacosException {
}
} }

View File

@ -24,15 +24,11 @@ import com.alibaba.cloud.dubbo.service.parameter.RequestBodyServiceParameterReso
import com.alibaba.cloud.dubbo.service.parameter.RequestHeaderServiceParameterResolver; import com.alibaba.cloud.dubbo.service.parameter.RequestHeaderServiceParameterResolver;
import com.alibaba.cloud.dubbo.service.parameter.RequestParamServiceParameterResolver; import com.alibaba.cloud.dubbo.service.parameter.RequestParamServiceParameterResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
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.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;
/** /**
* Spring Boot Auto-Configuration class for Dubbo Service. * Spring Boot Auto-Configuration class for Dubbo Service.
@ -49,17 +45,6 @@ public class DubboServiceAutoConfiguration {
return new DubboGenericServiceFactory(); return new DubboGenericServiceFactory();
} }
/**
* Build a primary {@link PropertyResolver} bean to {@link Autowired @Autowired}.
* @param environment {@link Environment}
* @return alias bean for {@link Environment}
*/
@Bean
@Primary
public PropertyResolver primaryPropertyResolver(Environment environment) {
return environment;
}
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@Import({ DubboGenericServiceExecutionContextFactory.class, @Import({ DubboGenericServiceExecutionContextFactory.class,
RequestParamServiceParameterResolver.class, RequestParamServiceParameterResolver.class,