mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
delete dependency spring-boot-starter-web,and NacosSeverList init with IClientConfig
This commit is contained in:
parent
1dfcd8796b
commit
ae4f1bf8a2
@ -29,11 +29,6 @@
|
|||||||
<artifactId>spring-cloud-commons</artifactId>
|
<artifactId>spring-cloud-commons</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
||||||
@ -62,7 +57,12 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
@ -70,6 +70,11 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
@ -33,7 +33,8 @@ public class NacosRibbonClientConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public ServerList<?> ribbonServerList(IClientConfig config) {
|
public ServerList<?> ribbonServerList(IClientConfig config) {
|
||||||
NacosServerList serverList = new NacosServerList(config.getClientName());
|
NacosServerList serverList = new NacosServerList();
|
||||||
|
serverList.initWithNiwsConfig(config);
|
||||||
return serverList;
|
return serverList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ public class NacosServerList extends AbstractServerList<NacosServer> {
|
|||||||
|
|
||||||
private String serviceId;
|
private String serviceId;
|
||||||
|
|
||||||
|
public NacosServerList(){}
|
||||||
|
|
||||||
public NacosServerList(String serviceId) {
|
public NacosServerList(String serviceId) {
|
||||||
this.serviceId = serviceId;
|
this.serviceId = serviceId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user