mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
仍有两个测试过不了
1. NacosConfigurationXmlJsonTest#contextLoads 2. NacosConfigurationNoSuffixTest#contextLoads Merge branch 'master' into finchley
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-dubbo-sample-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot dependencies -->
|
||||
|
@@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Client Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
|
@@ -1,6 +1,9 @@
|
||||
dubbo:
|
||||
cloud:
|
||||
subscribed-services: spring-cloud-alibaba-dubbo-server
|
||||
protocols:
|
||||
dubbo:
|
||||
port: -1
|
||||
|
||||
spring:
|
||||
application:
|
||||
|
@@ -52,6 +52,8 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Consumer Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
@@ -60,7 +62,8 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
@EnableCaching
|
||||
public class DubboSpringCloudConsumerBootstrap {
|
||||
|
||||
@Reference
|
||||
|
||||
@Reference(protocol = "dubbo")
|
||||
private UserService userService;
|
||||
|
||||
@Reference(version = "1.0.0", protocol = "dubbo")
|
||||
|
@@ -1,4 +1,5 @@
|
||||
dubbo:
|
||||
|
||||
registry:
|
||||
# The Spring Cloud Dubbo's registry extension
|
||||
## the default value of dubbo-provider-services is "*", that means to subscribe all providers,
|
||||
|
@@ -8,6 +8,8 @@ spring:
|
||||
# default disable all
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
enabled: false
|
||||
register-enabled: false
|
||||
|
@@ -42,7 +42,6 @@
|
||||
</dependency>
|
||||
|
||||
<!-- List all Spring Cloud starters for Service Discovery -->
|
||||
|
||||
<!-- Spring Cloud Nacos Service Discovery -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
|
@@ -23,6 +23,8 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Provider Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
|
@@ -25,6 +25,8 @@ import org.apache.dubbo.config.annotation.Service;
|
||||
/**
|
||||
* In-Memory {@link UserService} implementation.
|
||||
*/
|
||||
// @Path("/")
|
||||
// @Service(version = "1.0.0", protocol = "dubbo")
|
||||
@Service(protocol = "dubbo")
|
||||
public class InMemoryUserService implements UserService {
|
||||
|
||||
|
@@ -42,8 +42,9 @@ import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Service(version = "1.0.0", protocol = { "dubbo", "rest" })
|
||||
|
||||
@Path("/")
|
||||
@Service(version = "1.0.0", protocol = { "dubbo", "rest" })
|
||||
public class StandardRestService implements RestService {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
@@ -9,11 +9,6 @@ dubbo:
|
||||
name: rest
|
||||
port: 9090
|
||||
server: netty
|
||||
registry:
|
||||
# The Spring Cloud Dubbo's registry extension
|
||||
address: spring-cloud://localhost
|
||||
# The traditional Dubbo's registry
|
||||
# address: zookeeper://127.0.0.1:2181
|
||||
feign:
|
||||
hystrix:
|
||||
enabled: true
|
@@ -33,6 +33,7 @@ spring:
|
||||
enabled: true
|
||||
register-enabled: true
|
||||
server-addr: 127.0.0.1:8848
|
||||
ephemeral: false
|
||||
|
||||
|
||||
---
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-dubbo-sample-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dubbo Spring Cloud Starter -->
|
||||
|
@@ -22,6 +22,8 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Provider Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
|
@@ -3,7 +3,6 @@ dubbo:
|
||||
base-packages: com.alibaba.cloud.dubbo.service
|
||||
protocols:
|
||||
dubbo:
|
||||
name: dubbo
|
||||
port: -1
|
||||
registries:
|
||||
new:
|
||||
|
@@ -8,6 +8,8 @@ spring:
|
||||
# default disable all
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
enabled: false
|
||||
register-enabled: false
|
||||
|
@@ -25,6 +25,8 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Server Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
|
@@ -15,6 +15,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-commons</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
@@ -29,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-dubbo-sample-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dubbo Spring Cloud Starter -->
|
||||
|
@@ -24,6 +24,8 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* Dubbo Spring Cloud Servlet Gateway Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableAutoConfiguration
|
||||
|
@@ -52,8 +52,8 @@ import org.springframework.util.StreamUtils;
|
||||
import org.springframework.web.servlet.HttpServletBean;
|
||||
import org.springframework.web.util.UriComponents;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.substringAfter;
|
||||
import static org.apache.commons.lang3.StringUtils.substringBetween;
|
||||
import static com.alibaba.cloud.commons.lang.StringUtils.substringAfter;
|
||||
import static com.alibaba.cloud.commons.lang.StringUtils.substringBetween;
|
||||
import static org.springframework.web.util.UriComponentsBuilder.fromUriString;
|
||||
|
||||
@WebServlet(urlPatterns = "/dsc/*")
|
||||
|
Reference in New Issue
Block a user