mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
commit
1e301b2168
2
pom.xml
2
pom.xml
@ -98,7 +98,7 @@
|
||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||
|
||||
<!-- Apache Dubbo -->
|
||||
<dubbo.version>2.7.6</dubbo.version>
|
||||
<dubbo.version>2.7.8</dubbo.version>
|
||||
<curator.version>4.0.1</curator.version>
|
||||
|
||||
<!-- Apache RocketMQ -->
|
||||
|
@ -24,7 +24,7 @@
|
||||
<seata.version>1.2.0</seata.version>
|
||||
<nacos.client.version>1.2.1</nacos.client.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-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
|
||||
----
|
||||
|
||||
同时生产环境上 Nacos 需要添加对应 DataId 的基础配置。例如,在生成环境下的 Naocs 添加了DataId为:nacos-config-product.yaml的配置:
|
||||
同时生产环境上 Nacos 需要添加对应 DataId 的基础配置。例如,在生产环境下的 Naocs 添加了DataId为:nacos-config-product.yaml的配置:
|
||||
|
||||
[source,subs="normal"]
|
||||
----
|
||||
|
@ -93,7 +93,7 @@ public class RedisDataSourceProperties extends AbstractDataSourceProperties {
|
||||
"RedisDataSource channel can not be empty");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(masterId) && StringUtils.isEmpty(masterId)) {
|
||||
if (StringUtils.isEmpty(masterId)) {
|
||||
throw new IllegalArgumentException(
|
||||
"RedisDataSource sentinel model,masterId can not be empty");
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@ -487,8 +486,7 @@ public class NacosConfigProperties {
|
||||
List<Config> result = new ArrayList<>();
|
||||
configList.stream()
|
||||
.collect(Collectors.groupingBy(cfg -> (cfg.getGroup() + cfg.getDataId()),
|
||||
() -> new ConcurrentHashMap<>(new LinkedHashMap<>()),
|
||||
Collectors.toList()))
|
||||
LinkedHashMap::new, Collectors.toList()))
|
||||
.forEach((key, list) -> {
|
||||
list.stream()
|
||||
.reduce((a, b) -> new Config(a.getDataId(), a.getGroup(),
|
||||
|
@ -74,7 +74,7 @@ public class NacosWatch implements ApplicationEventPublisherAware, SmartLifecycl
|
||||
|
||||
private static ThreadPoolTaskScheduler getTaskScheduler() {
|
||||
ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
|
||||
taskScheduler.setBeanName("Nacso-Watch-Task-Scheduler");
|
||||
taskScheduler.setBeanName("Nacos-Watch-Task-Scheduler");
|
||||
taskScheduler.initialize();
|
||||
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.RequestParamServiceParameterResolver;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
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.
|
||||
@ -49,17 +45,6 @@ public class DubboServiceAutoConfiguration {
|
||||
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)
|
||||
@Import({ DubboGenericServiceExecutionContextFactory.class,
|
||||
RequestParamServiceParameterResolver.class,
|
||||
|
Loading…
x
Reference in New Issue
Block a user