Merge pull request #2 from alibaba/master

sync
pull/1737/head
K 5 years ago committed by GitHub
commit 1e301b2168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 -->

@ -24,7 +24,7 @@
<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.2.1</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>

@ -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"]
---- ----

@ -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");
} }

@ -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(),

@ -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;
} }

@ -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,

Loading…
Cancel
Save