mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
4.2.1
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
<parent>
|
||||
<groupId>com.gitee.sop</groupId>
|
||||
<artifactId>sop-parent</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>sop-website</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.gitee.sop</groupId>
|
||||
<artifactId>sop-website</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<groupId>com.gitee.sop</groupId>
|
||||
<artifactId>sop-bridge-nacos</artifactId>
|
||||
<!--<artifactId>sop-bridge-eureka</artifactId>-->
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@@ -29,6 +29,9 @@ public class NacosServerService implements ServerService {
|
||||
@Value("${nacos.discovery.namespace:${spring.cloud.nacos.discovery.namespace:}}")
|
||||
private String nacosNamespace;
|
||||
|
||||
@Value("${nacos.discovery.group:${spring.cloud.nacos.discovery.group:DEFAULT_GROUP}}")
|
||||
private String nacosGroup;
|
||||
|
||||
private NamingService namingService;
|
||||
|
||||
@PostConstruct
|
||||
@@ -49,7 +52,7 @@ public class NacosServerService implements ServerService {
|
||||
Objects.requireNonNull(serviceId, "serviceId can not be null");
|
||||
List<String> list = Collections.emptyList();
|
||||
try {
|
||||
List<Instance> allInstances = namingService.getAllInstances(serviceId);
|
||||
List<Instance> allInstances = namingService.getAllInstances(serviceId, nacosGroup);
|
||||
list = allInstances.stream().map(instance -> instance.getIp() + ":" + instance.getPort())
|
||||
.collect(Collectors.toList());
|
||||
} catch (NacosException e) {
|
||||
|
Reference in New Issue
Block a user