1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge code from upstream

This commit is contained in:
ly
2019-07-23 21:34:04 +08:00
parent 5cf28cb7a6
commit af09456b7d
587 changed files with 443 additions and 40842 deletions

View File

@@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-nacos-discovery-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
@@ -42,7 +42,7 @@
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-sentinel-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
</dependencies>

View File

@@ -1,12 +1,7 @@
package com.alibaba.cloud.examples;
import com.alibaba.cloud.examples.ConsumerApplication.EchoService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.alibaba.cloud.sentinel.annotation.SentinelRestTemplate;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -18,10 +13,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;
import com.alibaba.cloud.examples.ConsumerApplication.EchoService;
import com.alibaba.cloud.sentinel.annotation.SentinelRestTemplate;
/**
* @author xiaojing
*/
@SpringCloudApplication
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class ConsumerApplication {

View File

@@ -1,7 +1,5 @@
package com.alibaba.cloud.examples;
import com.alibaba.cloud.examples.ConsumerApplication.EchoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.PathVariable;
@@ -11,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import com.alibaba.cloud.examples.ConsumerApplication.EchoService;
/**
* @author xiaojing
*/

View File

@@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-nacos-discovery-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>

View File

@@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-nacos-discovery-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>

View File

@@ -1,3 +1,19 @@
/*
* Copyright (C) 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.examples;
import org.springframework.beans.factory.annotation.Value;

View File

@@ -1,18 +0,0 @@
package com.alibaba.cloud.examples;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @author JevonYang
*/
@SpringBootApplication
@EnableDiscoveryClient
public class NacosDiscoverySpringConfigApplication {
public static void main(String[] args) {
SpringApplication.run(NacosDiscoverySpringConfigApplication.class, args);
}
}

View File

@@ -28,7 +28,7 @@
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-nacos-discovery-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>

View File

@@ -29,8 +29,8 @@ import org.springframework.cloud.config.server.EnableConfigServer;
@EnableConfigServer
public class SpringCloudConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(SpringCloudConfigServerApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(SpringCloudConfigServerApplication.class, args);
}
}
}

View File

@@ -19,7 +19,7 @@
<modules>
<module>nacos-discovery-consumer-example</module>
<module>nacos-discovery-provider-example</module>
<module>nacos-discovery-spring-cloud-config-client</module>
<module>nacos-discovery-spring-cloud-config-server</module>
<module>nacos-discovery-spring-cloud-config-client</module>
</modules>
</project>

View File

@@ -15,7 +15,7 @@
1. 首先,修改 pom.xml 文件,引入 Nacos Discovery Starter。
<dependency>
<groupId>org.springframework.cloud</groupId>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>

View File

@@ -14,7 +14,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
1. Add dependency spring-cloud-starter-alibaba-nacos-discovery in the pom.xml file in your Spring Cloud project.
<dependency>
<groupId>org.springframework.cloud</groupId>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>