delete dependency spring-boot-starter-web,and NacosSeverList init with IClientConfig

pull/20/head
flystar32 6 years ago
parent 1dfcd8796b
commit ae4f1bf8a2

@ -29,11 +29,6 @@
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
@ -62,7 +57,12 @@
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
@ -70,6 +70,11 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

@ -33,7 +33,8 @@ public class NacosRibbonClientConfiguration {
@Bean
@ConditionalOnMissingBean
public ServerList<?> ribbonServerList(IClientConfig config) {
NacosServerList serverList = new NacosServerList(config.getClientName());
NacosServerList serverList = new NacosServerList();
serverList.initWithNiwsConfig(config);
return serverList;
}
}

@ -36,6 +36,7 @@ public class NacosServerList extends AbstractServerList<NacosServer> {
private String serviceId;
public NacosServerList(){}
public NacosServerList(String serviceId) {
this.serviceId = serviceId;

Loading…
Cancel
Save