Merge remote-tracking branch 'upstream/master'
# Conflicts:
# README.md
# README_CN.md
# dubbo-spring-boot-actuator/pom.xml
# dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboPropertiesMetadata.java
# dubbo-spring-boot-distribution/pom.xml
# dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/pom.xml
# dubbo-spring-boot-samples/auto-configure-samples/provider-sample/pom.xml
# dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/pom.xml
# dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
# dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/pom.xml
# dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/pom.xml
# dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/pom.xml
# dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/pom.xml
# dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/pom.xml
diff --git a/NOTICE b/NOTICE
index 97fefd0..62b2787 100644
--- a/NOTICE
+++ b/NOTICE
@@ -2,13 +2,4 @@
Copyright 2018-2019 The Apache Software Foundation
This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product contains code form the Netty Project:
-
-The Netty Project
-=================
-Please visit the Netty web site for more information:
- * http://netty.io/
-
-Copyright 2014 The Netty Project
\ No newline at end of file
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/README.md b/README.md
index be16c26..c235eaa 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,15 @@
-# Dubbo Spring Boot Project
+# Apache Dubbo Spring Boot Project
[![Build Status](https://travis-ci.org/apache/incubator-dubbo-spring-boot-project.svg?branch=master)](https://travis-ci.org/apache/incubator-dubbo-spring-boot-project)
[![codecov](https://codecov.io/gh/apache/incubator-dubbo-spring-boot-project/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/incubator-dubbo-spring-boot-project)
-[![Gitter](https://badges.gitter.im/alibaba/dubbo.svg)](https://gitter.im/alibaba/dubbo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
![license](https://img.shields.io/github/license/apache/incubator-dubbo-spring-boot-project.svg)
-![maven](https://img.shields.io/maven-central/v/com.alibaba.boot/dubbo-spring-boot-starter.svg)
-[Apache Dubbo(incubating)](https://github.com/apache/incubator-dubbo) Spring Boot Project makes it easy to create [Spring Boot](https://github.com/spring-projects/spring-boot/) application using Dubbo as RPC Framework. What's more, it aslo provides
+[Apache Dubbo(incubating)](https://github.com/apache/incubator-dubbo) Spring Boot Project makes it easy to create [Spring Boot](https://github.com/spring-projects/spring-boot/) application using Dubbo as RPC Framework. What's more, it also provides
* [auto-configure features](dubbo-spring-boot-autoconfigure) (e.g., annotation-driven, auto configuration, externalized configuration).
* [production-ready features](dubbo-spring-boot-actuator) (e.g., security, health checks, externalized configuration).
-> Apache Dubbo(incubating) is a high-performance, java based [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) framework open-sourced by Alibaba. As in many RPC systems, dubbo is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a dubbo server to handle client calls. On the client side, the client has a stub that provides the same methods as the server.
+> Apache Dubbo (incubating) |ˈdʌbəʊ| is a high-performance, light weight, java based RPC framework. Dubbo offers three key functionalities, which include interface based remote call, fault tolerance & load balancing, and automatic service registration & discovery.
## [中文说明](README_CN.md)
@@ -22,7 +20,7 @@
```xml
<properties>
<spring-boot.version>2.1.1.RELEASE</spring-boot.version>
- <dubbo.version>2.6.5</dubbo.version>
+ <dubbo.version>2.7.0</dubbo.version>
</properties>
<dependencyManagement>
@@ -35,33 +33,49 @@
<type>pom</type>
<scope>import</scope>
</dependency>
-
- <!-- Dubbo dependencies -->
+
+ <!-- Apache Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-bom</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <version>${dubbo.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Dubbo Spring Boot Starter -->
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
- <version>0.2.1.RELEASE</version>
+ <version>2.7.0</version>
</dependency>
+
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
</dependency>
</dependencies>
```
@@ -70,8 +84,9 @@
```xml
<repositories>
<repository>
- <id>sonatype-nexus-snapshots</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@@ -83,13 +98,6 @@
```
-## Developing Versions
-
-For now, `dubbo-spring-boot-starter` will separate two versions for Spring Boot 2.x and 1.x once release :
-
-* [`0.2.x`](https://github.com/apache/incubator-dubbo-spring-boot-project) is a main stream release version for Spring Boot 2.x
-
-* [`0.1.x`](https://github.com/apache/incubator-dubbo-spring-boot-project/tree/0.1.x) is a legacy version for maintaining Spring Boot 1.x
### Build from Source
@@ -100,13 +108,6 @@
> Maven install = `mvn install`
-### Dependencies
-
-| versions | Java | Spring Boot | Dubbo |
-| -------- | ----- | ----------- | ---------- |
-| `0.2.1` | 1.8+ | `2.1.x` | `2.6.5` + |
-| `0.1.1` | 1.7+ | `1.5.x` | `2.6.5` + |
-
## Getting Started
@@ -134,13 +135,13 @@
```java
@Service(version = "1.0.0")
public class DefaultDemoService implements DemoService {
-
+
/**
- * The default value of ${dubbo.application.name} is ${spring.application.name}
- */
+ * The default value of ${dubbo.application.name} is ${spring.application.name}
+ */
@Value("${dubbo.application.name}")
private String serviceName;
-
+
public String sayHello(String name) {
return String.format("[%s] : Hello, %s", serviceName, name);
}
@@ -164,9 +165,8 @@
```properties
# Spring boot application
spring.application.name=dubbo-auto-configuration-provider-demo
-
- # Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service
- dubbo.scan.base-packages=com.alibaba.boot.dubbo.demo.provider.service
+ # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+ dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
@@ -188,44 +188,32 @@
```java
@EnableAutoConfiguration
- public class DubboConsumerBootstrap {
-
+ public class DubboAutoConfigurationConsumerBootstrap {
+
private final Logger logger = LoggerFactory.getLogger(getClass());
-
- @Reference(version = "1.0.0", url = "dubbo://localhost:12345")
+
+ @Reference(version = "1.0.0", url = "dubbo://127.0.0.1:12345")
private DemoService demoService;
-
+
+ public static void main(String[] args) {
+ SpringApplication.run(DubboAutoConfigurationConsumerBootstrap.class).close();
+ }
+
@Bean
public ApplicationRunner runner() {
return args -> {
logger.info(demoService.sayHello("mercyblitz"));
};
}
-
- public static void main(String[] args) {
- SpringApplication.run(DubboConsumerBootstrap.class).close();
- }
}
```
-2. configures `application.properties`
+2. configures `application.yml`
- ```properties
- # Spring boot application
- spring.application.name = dubbo-consumer-demo
- server.port = 8080
- management.port = 8081
-
-
- # Dubbo Config properties
- ## ApplicationConfig Bean
- dubbo.application.id = dubbo-consumer-demo
- dubbo.application.name = dubbo-consumer-demo
-
- ## ProtocolConfig Bean
- dubbo.protocol.id = dubbo
- dubbo.protocol.name = dubbo
- dubbo.protocol.port = 12345
+ ```yaml
+ spring:
+ application:
+ name: dubbo-auto-configure-consumer-sample
```
If `DubboProviderDemo` works well, please mark sure `DubboProviderDemo` is started.
@@ -238,9 +226,9 @@
Having trouble with Dubbo Spring Boot? We’d like to help!
-- If you are upgrading, read the [release notes](https://github.com/apache/incubator-dubbo-spring-boot-project/releases) for upgrade instructions and "new and noteworthy" features.
-- Ask a question - You can subscribe [Dubbo User Mailling List](mailto:dev-subscribe@dubbo.apache.org).
-- Report bugs at [issues](https://github.com/apache/incubator-dubbo-spring-boot-project/issues).
+- If you are upgrading, read the [release notes](https://github.com/dubbo/dubbo-spring-boot-project/releases) for upgrade instructions and "new and noteworthy" features.
+- Ask a question - You can subscribe [Dubbo User Mailling List](mailto:dubbo+subscribe@googlegroups.com).
+- Report bugs at [github.com/dubbo/dubbo-spring-boot-project/issues](https://github.com/dubbo/dubbo-spring-boot-project/issues).
@@ -257,7 +245,7 @@
## Modules
-There are some modules in Dubbo Spring Boot Project, let's take a look at below overview:
+There are some modules in Apache Dubbo Spring Boot Project, let's take a look at below overview:
@@ -292,5 +280,3 @@
- [Auto-Configuaration Samples](dubbo-spring-boot-samples/auto-configure-samples)
- [Externalized Configuration Samples](dubbo-spring-boot-samples/externalized-configuration-samples)
- [Registry Zookeeper Samples](dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples)
-- [Registry Nacos Samples](dubbo-spring-boot-samples/dubbo-registry-nacos-samples)
-- [Sample API](dubbo-spring-boot-samples/sample-api)
diff --git a/README_CN.md b/README_CN.md
index bccd60c..56187de 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -2,20 +2,17 @@
[![Build Status](https://travis-ci.org/apache/incubator-dubbo-spring-boot-project.svg?branch=master)](https://travis-ci.org/apache/incubator-dubbo-spring-boot-project)
[![codecov](https://codecov.io/gh/apache/incubator-dubbo-spring-boot-project/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/incubator-dubbo-spring-boot-project)
-[![Gitter](https://badges.gitter.im/alibaba/dubbo.svg)](https://gitter.im/alibaba/dubbo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
![license](https://img.shields.io/github/license/apache/incubator-dubbo-spring-boot-project.svg)
-![maven](https://img.shields.io/maven-central/v/com.alibaba.boot/dubbo-spring-boot-starter.svg)
-[Dubbo](https://github.com/alibaba/dubbo) Spring Boot 工程致力于简化 Dubbo RPC 框架在
+[Dubbo](https://dubbo.apache.org/zh-cn/index.html) Apache Dubbo™ (incubating)是一款高性能Java RPC框架。
[Spring Boot](https://github.com/spring-projects/spring-boot/) 应用场景的开发。同时也整合了 Spring Boot 特性:
* [自动装配](dubbo-spring-boot-autoconfigure) (比如: 注解驱动, 自动装配等).
* [Production-Ready](dubbo-spring-boot-actuator) (比如: 安全, 健康检查, 外部化配置等).
+> Apache Dubbo (incubating) |ˈdʌbəʊ| 是一款高性能、轻量级的开源Java RPC框架,它提供了三大核心能力:面向接口的远程方法调用,智能容错和负载均衡,以及服务自动注册和发现。
-> Dubbo *|ˈdʌbəʊ|* is a high-performance, java based [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) framework open-sourced by Alibaba. As in many RPC systems, dubbo is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a dubbo server to handle client calls. On the client side, the client has a stub that provides the same methods as the server.
-
## [English README](README_CN.md)
@@ -25,7 +22,7 @@
```xml
<properties>
<spring-boot.version>2.1.1.RELEASE</spring-boot.version>
- <dubbo.version>2.6.5</dubbo.version>
+ <dubbo.version>2.7.0</dubbo.version>
</properties>
<dependencyManagement>
@@ -38,33 +35,49 @@
<type>pom</type>
<scope>import</scope>
</dependency>
-
- <!-- Dubbo dependencies -->
+
+ <!-- Aapche Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-bom</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <version>${dubbo.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Dubbo Spring Boot Starter -->
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
- <version>0.2.1.RELEASE</version>
+ <version>2.7.0</version>
</dependency>
+
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
</dependency>
</dependencies>
```
@@ -73,8 +86,9 @@
```xml
<repositories>
<repository>
- <id>sonatype-nexus-snapshots</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@@ -86,13 +100,6 @@
```
-## 开发版本
-
-从现在开始, `dubbo-spring-boot-project` 将在每个发布中发行两个版本 :
-
-* [`0.2.x`](https://github.com/apache/incubator-dubbo-spring-boot-project) 是支持 Spring Boot 2.x 的主要版本(推荐,长期维护)
-
-* [`0.1.x`](https://github.com/apache/incubator-dubbo-spring-boot-project/tree/0.1.x) 是支持 Spring Boot 1.x 的维护版本(兼容,短期维护)
### 源代码构建
@@ -102,12 +109,6 @@
1. Maven install 当前工程
> Maven install = `mvn install`
-### 依赖关系
-
-| versions | Java | Spring Boot | Dubbo |
-| -------- | ----- | ----------- | ---------- |
-| `0.2.1` | 1.8+ | `2.1.x` | `2.6.5` + |
-| `0.1.1` | 1.7+ | `1.5.x` | `2.6.5` + |
@@ -133,72 +134,57 @@
1. 实现 `DemoService` 接口
-```java
-@Service(
- version = "${demo.service.version}",
- application = "${dubbo.application.id}",
- protocol = "${dubbo.protocol.id}",
- registry = "${dubbo.registry.id}"
-)
-public class DefaultDemoService implements DemoService {
-
- public String sayHello(String name) {
- return "Hello, " + name + " (from Spring Boot)";
+ ```java
+ @Service(version = "1.0.0")
+ public class DefaultDemoService implements DemoService {
+
+ /**
+ * The default value of ${dubbo.application.name} is ${spring.application.name}
+ */
+ @Value("${dubbo.application.name}")
+ private String serviceName;
+
+ public String sayHello(String name) {
+ return String.format("[%s] : Hello, %s", serviceName, name);
+ }
}
-
-}
-```
+ ```
2. 编写 Spring Boot 引导程序
-```java
-@SpringBootApplication
-public class DubboProviderDemo {
+ ```java
+ @EnableAutoConfiguration
+ public class DubboProviderDemo {
- public static void main(String[] args) {
-
- new SpringApplicationBuilder(DubboProviderDemo.class)
- .web(false) // 非 Web 应用
- .run(args);
-
+ public static void main(String[] args) {
+ SpringApplication.run(DubboProviderDemo.class,args);
+ }
}
-
-}
-```
+ ```
3. 配置 `application.properties` :
-```properties
-# Spring boot application
-spring.application.name = dubbo-provider-demo
-server.port = 9090
-management.port = 9091
+ ```properties
+ # Spring boot application
+ spring.application.name=dubbo-auto-configuration-provider-demo
+ # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+ dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
-# Service version
-demo.service.version = 1.0.0
+ # Dubbo Application
+ ## The default value of dubbo.application.name is ${spring.application.name}
+ ## dubbo.application.name=${spring.application.name}
-# Base packages to scan Dubbo Components (e.g @Service , @Reference)
-dubbo.scan.basePackages = com.alibaba.boot.dubbo.demo.provider.service
+ # Dubbo Protocol
+ dubbo.protocol.name=dubbo
+ dubbo.protocol.port=12345
-# Dubbo Config properties
-## ApplicationConfig Bean
-dubbo.application.id = dubbo-provider-demo
-dubbo.application.name = dubbo-provider-demo
+ ## Dubbo Registry
+ dubbo.registry.address=N/A
+ ```
-## ProtocolConfig Bean
-dubbo.protocol.id = dubbo
-dubbo.protocol.name = dubbo
-dubbo.protocol.port = 12345
-
-## RegistryConfig Bean
-dubbo.registry.id = my-registry
-dubbo.registry.address = N/A
-```
-
-更多的实现细节 , 请参考 [Dubbo 服务提供方示例](dubbo-spring-boot-samples/dubbo-spring-boot-sample-provider).
@@ -207,69 +193,44 @@
1. 通过 `@Reference` 注入 `DemoService` :
-```java
-@RestController
-public class DemoConsumerController {
-
- @Reference(version = "${demo.service.version}",
- application = "${dubbo.application.id}",
- url = "dubbo://localhost:12345")
- private DemoService demoService;
-
- @RequestMapping("/sayHello")
- public String sayHello(@RequestParam String name) {
- return demoService.sayHello(name);
+ ```java
+ @EnableAutoConfiguration
+ public class DubboAutoConfigurationConsumerBootstrap {
+
+ private final Logger logger = LoggerFactory.getLogger(getClass());
+
+ @Reference(version = "1.0.0", url = "dubbo://127.0.0.1:12345")
+ private DemoService demoService;
+
+ public static void main(String[] args) {
+ SpringApplication.run(DubboAutoConfigurationConsumerBootstrap.class).close();
+ }
+
+ @Bean
+ public ApplicationRunner runner() {
+ return args -> {
+ logger.info(demoService.sayHello("mercyblitz"));
+ };
+ }
}
-
-}
-```
+ ```
-2. 编写 Spring Boot 引导程序(Web 应用) :
+2. 配置 `application.yml` :
-```java
-@SpringBootApplication(scanBasePackages = "com.alibaba.boot.dubbo.demo.consumer.controller")
-public class DubboConsumerDemo {
-
- public static void main(String[] args) {
-
- SpringApplication.run(DubboConsumerDemo.class,args);
-
- }
-
-}
-```
-
-
-
-3. 配置 `application.properties` :
-
-```properties
-# Spring boot application
-spring.application.name = dubbo-consumer-demo
-server.port = 8080
-management.port = 8081
-
-# Service Version
-demo.service.version = 1.0.0
-
-# Dubbo Config properties
-## ApplicationConfig Bean
-dubbo.application.id = dubbo-consumer-demo
-dubbo.application.name = dubbo-consumer-demo
-
-## ProtocolConfig Bean
-dubbo.protocol.id = dubbo
-dubbo.protocol.name = dubbo
-dubbo.protocol.port = 12345
-```
+ ```yaml
+ spring:
+ application:
+ name: dubbo-auto-configure-consumer-sample
+ ```
请确保 Dubbo 服务提供方服务可用, `DubboProviderDemo` 运行方可正常。
-更多的实现细节,请参考 [Dubbo 服务消费方示例](dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer)
+更多的实现细节,请参考 [Dubbo 示例](dubbo-spring-boot-samples)
+
@@ -277,9 +238,10 @@
如果您在使用 Dubbo Spring Boot 中遇到任何问题或者有什么建议? 我们非常需要您的支持!
-- 如果您需要升级版本,请提前阅读[发布公告](https://github.com/apache/incubator-dubbo-spring-boot-project/releases),了解最新的特性和问题修复。
-- 如果您遇到任何问题 ,您可以订阅 [Dubbo 用户邮件列表](mailto:mailto:dev-subscribe@dubbo.apache.org)。
-- 问题反馈,您可以在 [issues](https://github.com/apache/incubator-dubbo-spring-boot-project/issues) 提出您遇到的使用问题。
+- 如果您需要升级版本,请提前阅读[发布公告](https://github.com/dubbo/dubbo-spring-boot-project/releases),了解最新的特性和问题修复。
+- 如果您遇到任何问题 ,您可以订阅 [Dubbo 用户邮件列表](mailto:dubbo+subscribe@googlegroups.com)。
+- 问题反馈,您可以在 [issues](https://github.com/dubbo/dubbo-spring-boot-project/issues) 提出您遇到的使用问题。
+
@@ -305,7 +267,7 @@
* [健康检查](dubbo-spring-boot-actuator#health-checks)
* [控制断点](dubbo-spring-boot-actuator#endpoints)
-* [外部化配置](dubbo-spring-boot-actuator#externalized-configuration))
+* [外部化配置](dubbo-spring-boot-actuator#externalized-configuration)
### [dubbo-spring-boot-starter](dubbo-spring-boot-starter)
@@ -316,10 +278,8 @@
### [dubbo-spring-boot-samples](dubbo-spring-boot-samples)
-示例工程包含以下项目:
+Dubbo Spring Boot 示例工程包括:
-- [自动装配示例](dubbo-spring-boot-samples/auto-configure-samples)
-- [外部化示例](dubbo-spring-boot-samples/externalized-configuration-samples)
-- [整合 Zookeeper 示例](dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples)
-- [整合 Nacos 示例](dubbo-spring-boot-samples/dubbo-registry-nacos-samples)
-- [示例 API](dubbo-spring-boot-samples/sample-api)
+- [自动装配](dubbo-spring-boot-samples/auto-configure-samples)
+- [外部化配置](dubbo-spring-boot-samples/externalized-configuration-samples)
+- [Zookeeper 注册中心](dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples)
diff --git a/dubbo-spring-boot-actuator/README.md b/dubbo-spring-boot-actuator/README.md
index 0b74034..ec743c6 100644
--- a/dubbo-spring-boot-actuator/README.md
+++ b/dubbo-spring-boot-actuator/README.md
@@ -15,33 +15,24 @@
-## Versions
-
-For now, `dubbo-spring-boot-actuator` will separate two versions for Spring Boot 2.x and 1.x once release :
-
-* `0.2.x` is a main stream release version for Spring Boot 2.x
-
-* `0.1.x` is a legacy version for maintaining Spring Boot 1.x
-
-
-
-
## Integrate with Maven
You can introduce the latest `dubbo-spring-boot-actuator` to your project by adding the following dependency to your pom.xml
```xml
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator</artifactId>
- <version>0.2.1</version>
+ <version>2.7.0</version>
</dependency>
```
+
If your project failed to resolve the dependency, try to add the following repository:
```xml
<repositories>
<repository>
- <id>sonatype-nexus-snapshots</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@@ -108,10 +99,6 @@
}
```
-In [samples](../dubbo-spring-boot-samples/) , `/health` Web Endpoints are exposed on http://localhost:8081/health
-([consumer](../dubbo-spring-boot-samples/dubbo-spring-boot-sample-consumer))
-
-
`memory`, `load`, `threadpool` and `server` are Dubbo's build-in `StatusChecker`s in above example.
Dubbo allows the application to extend `StatusChecker`'s SPI.
@@ -135,16 +122,16 @@
- `META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker` declares Build-in `StatusChecker`s as follow :
+ `META-INF/dubbo/internal/org.apache.dubbo.common.status.StatusChecker` declares Build-in `StatusChecker`s as follow :
```properties
-registry=com.alibaba.dubbo.registry.status.RegistryStatusChecker
-spring=com.alibaba.dubbo.config.spring.status.SpringStatusChecker
-datasource=com.alibaba.dubbo.config.spring.status.DataSourceStatusChecker
-memory=com.alibaba.dubbo.common.status.support.MemoryStatusChecker
-load=com.alibaba.dubbo.common.status.support.LoadStatusChecker
-server=com.alibaba.dubbo.rpc.protocol.dubbo.status.ServerStatusChecker
-threadpool=com.alibaba.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusChecker
+registry=org.apache.dubbo.registry.status.RegistryStatusChecker
+spring=org.apache.dubbo.config.spring.status.SpringStatusChecker
+datasource=org.apache.dubbo.config.spring.status.DataSourceStatusChecker
+memory=org.apache.dubbo.common.status.support.MemoryStatusChecker
+load=org.apache.dubbo.common.status.support.LoadStatusChecker
+server=org.apache.dubbo.rpc.protocol.dubbo.status.ServerStatusChecker
+threadpool=org.apache.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusChecker
```
@@ -162,11 +149,11 @@
| ID | Enabled | HTTP URI | HTTP Method | Description | Content Type |
| ------------------- | ----------- | ----------------------------------- | ------------------ | ------------------ | ------------------ |
| `dubbo` | `true` | `/actuator/dubbo` | `GET` | Exposes Dubbo's meta data | `application/json` |
-| `dubboProperties` | `true` | `/actuator/dubbo/properties` | `GET` | Exposes all Dubbo's Properties | `application/json` |
-| `dubboServices` | `false` | `/dubbo/services` | `GET` | Exposes all Dubbo's `ServiceBean` | `application/json` |
-| `dubboReferences` | `false` | `/actuator/dubbo/references` | `GET` | Exposes all Dubbo's `ReferenceBean` | `application/json` |
-| `dubboConfigs` | `true` | `/actuator/dubbo/configs` | `GET` | Exposes all Dubbo's `*Config` | `application/json` |
-| `dubboShutdown` | `false` | `/actuator/dubbo/shutdown` | `POST` | Shutdown Dubbo services | `application/json` |
+| `dubboproperties` | `true` | `/actuator/dubbo/properties` | `GET` | Exposes all Dubbo's Properties | `application/json` |
+| `dubboservices` | `false` | `/dubbo/services` | `GET` | Exposes all Dubbo's `ServiceBean` | `application/json` |
+| `dubboreferences` | `false` | `/actuator/dubbo/references` | `GET` | Exposes all Dubbo's `ReferenceBean` | `application/json` |
+| `dubboconfigs` | `true` | `/actuator/dubbo/configs` | `GET` | Exposes all Dubbo's `*Config` | `application/json` |
+| `dubboshutdown` | `false` | `/actuator/dubbo/shutdown` | `POST` | Shutdown Dubbo services | `application/json` |
@@ -184,15 +171,15 @@
{
"timestamp": 1516623290166,
"versions": {
- "dubbo-spring-boot": "0.2.0",
- "dubbo": "2.6.2"
+ "dubbo-spring-boot": "2.7.0",
+ "dubbo": "2.7.0"
},
"urls": {
- "dubbo": "https://github.com/alibaba/dubbo",
- "google-group": "http://groups.google.com/group/dubbo",
- "github": "https://github.com/dubbo/dubbo-spring-boot-project",
- "issues": "https://github.com/dubbo/dubbo-spring-boot-project/issues",
- "git": "https://github.com/dubbo/dubbo-spring-boot-project.git"
+ "dubbo": "https://github.com/apache/incubator-dubbo/",
+ "google-group": "dev@dubbo.apache.org",
+ "github": "https://github.com/apache/incubator-dubbo-spring-boot-project",
+ "issues": "https://github.com/apache/incubator-dubbo-spring-boot-project/issues",
+ "git": "https://github.com/apache/incubator-dubbo-spring-boot-project.git"
}
}
```
@@ -214,7 +201,7 @@
"dubbo.protocol.port": "12345",
"dubbo.registry.address": "N/A",
"dubbo.registry.id": "my-registry",
- "dubbo.scan.basePackages": "com.alibaba.boot.dubbo.demo.provider.service"
+ "dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.demo.provider.service"
}
```
@@ -230,12 +217,12 @@
```json
{
- "ServiceBean@com.alibaba.boot.dubbo.demo.api.DemoService#defaultDemoService": {
+ "ServiceBean@org.apache.dubbo.spring.boot.demo.api.DemoService#defaultDemoService": {
"accesslog": null,
"actives": null,
"cache": null,
"callbacks": null,
- "class": "com.alibaba.dubbo.config.spring.ServiceBean",
+ "class": "org.apache.dubbo.config.spring.ServiceBean",
"cluster": null,
"connections": null,
"delay": null,
@@ -246,9 +233,9 @@
"filter": "",
"generic": "false",
"group": null,
- "id": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interface": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interfaceClass": "com.alibaba.boot.dubbo.demo.api.DemoService",
+ "id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+ "interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+ "interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"layer": null,
"listener": "",
"loadbalance": null,
@@ -258,7 +245,7 @@
"onconnect": null,
"ondisconnect": null,
"owner": null,
- "path": "com.alibaba.boot.dubbo.demo.api.DemoService",
+ "path": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"proxy": null,
"retries": null,
"scope": null,
@@ -267,12 +254,12 @@
"timeout": null,
"token": null,
"unexported": false,
- "uniqueServiceName": "com.alibaba.boot.dubbo.demo.api.DemoService:1.0.0",
+ "uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
"validation": null,
"version": "1.0.0",
"warmup": null,
"weight": null,
- "serviceClass": "com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService"
+ "serviceClass": "DefaultDemoService"
}
}
```
@@ -287,20 +274,20 @@
```json
{
- "private com.alibaba.boot.dubbo.demo.api.DemoService com.alibaba.boot.dubbo.demo.consumer.controller.DemoConsumerController.demoService": {
+ "private org.apache.dubbo.spring.boot.demo.api.DemoService org.apache.dubbo.spring.boot.demo.consumer.controller.DemoConsumerController.demoService": {
"actives": null,
"cache": null,
"callbacks": null,
- "class": "com.alibaba.dubbo.config.spring.ReferenceBean",
+ "class": "org.apache.dubbo.config.spring.ReferenceBean",
"client": null,
"cluster": null,
"connections": null,
"filter": "",
"generic": null,
"group": null,
- "id": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interface": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interfaceClass": "com.alibaba.boot.dubbo.demo.api.DemoService",
+ "id": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+ "interface": "org.apache.dubbo.spring.boot.demo.api.DemoService",
+ "interfaceClass": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"layer": null,
"lazy": null,
"listener": "",
@@ -308,7 +295,7 @@
"local": null,
"merger": null,
"mock": null,
- "objectType": "com.alibaba.boot.dubbo.demo.api.DemoService",
+ "objectType": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"onconnect": null,
"ondisconnect": null,
"owner": null,
@@ -323,12 +310,12 @@
"stub": null,
"stubevent": null,
"timeout": null,
- "uniqueServiceName": "com.alibaba.boot.dubbo.demo.api.DemoService:1.0.0",
+ "uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
"url": "dubbo://localhost:12345",
"validation": null,
"version": "1.0.0",
"invoker": {
- "class": "com.alibaba.dubbo.common.bytecode.proxy0"
+ "class": "org.apache.dubbo.common.bytecode.proxy0"
}
}
}
@@ -347,7 +334,7 @@
"ApplicationConfig": {
"dubbo-consumer-demo": {
"architecture": null,
- "class": "com.alibaba.dubbo.config.ApplicationConfig",
+ "class": "org.apache.dubbo.config.ApplicationConfig",
"compiler": null,
"dumpDirectory": null,
"environment": null,
@@ -377,7 +364,7 @@
"accesslog": null,
"buffer": null,
"charset": null,
- "class": "com.alibaba.dubbo.config.ProtocolConfig",
+ "class": "org.apache.dubbo.config.ProtocolConfig",
"client": null,
"codec": null,
"contextpath": null,
diff --git a/dubbo-spring-boot-actuator/README_CN.md b/dubbo-spring-boot-actuator/README_CN.md
deleted file mode 100644
index 14a4103..0000000
--- a/dubbo-spring-boot-actuator/README_CN.md
+++ /dev/null
@@ -1,513 +0,0 @@
-# Dubbo Spring Boot Production-Ready
-
-`dubbo-spring-boot-actuator` 提供 Production-Ready 特性 (比如 [健康检查](#health-checks), [OPS 端点](#endpoints), and [外部化配置](#externalized-configuration)).
-
-
-
-## 目录
-
-1. [主目录](https://github.com/dubbo/dubbo-spring-boot-project)
-2. [Maven 整合](#integrate-with-maven)
-3. [健康检查](#health-checks)
-4. [OPS 端点](#endpoints)
-5. [外部化配置](#externalized-configuration)
-
-
-
-## Maven 整合
-
-### 稳定版本
-
-`dubbo-spring-boot-actuator` 是可选模块,它不应该独立存在,需要与 `dubbo-spring-boot-starter` 并存方可工作正常。您可以直接增加到
-应用工程的 pom.xml 文件:
-
-
-```xml
-<dependencies>
-
- ...
-
- <!-- 功能特性 -->
- <dependency>
- <groupId>com.alibaba.boot</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>0.2.1</version>
- </dependency>
-
- <!-- Production-Ready 特性 -->
- <dependency>
- <groupId>com.alibaba.boot</groupId>
- <artifactId>dubbo-spring-boot-actuator</artifactId>
- <version>0.2.1</version>
- </dependency>
-
- ...
-
-</dependencies>
-```
-
-### 开发版本
-
-如果你需要尝试最新 `dubbo-spring-boot-actuator` 的特性,您可以自将[开发分支](../tree/0.1.x) 手动 Maven install 到本地 Maven 仓库。
-
-
-## 健康检查
-
-`dubbo-spring-boot-actuator` 实现了标准的 Spring Boot `HealthIndicator` , 它将聚合 Dubbo 相关的健康指标数据到 Spring Boot's `Health`
- ,并且 暴露在 `HealthEndpoint` ,它能够在 works MVC (Spring Web MVC) and JMX (Java Management Extensions) both if they are available.
-
-
-### Web Endpoint : `/health`
-
-
-假设 Spring Boot Web 应用没有指定 `management.port` 属性, 运行后,通过 Web 客户端访问 http://localhost:8080/health,HTTP 相应将会返回一个 JSON 格式的内容,如下所示:
-
-```json
-{
- "status": "UP",
- "dubbo": {
- "status": "UP",
- "memory": {
- "source": "management.health.dubbo.status.defaults",
- "status": {
- "level": "OK",
- "message": "max:3641M,total:383M,used:92M,free:291M",
- "description": null
- }
- },
- "load": {
- "source": "management.health.dubbo.status.extras",
- "status": {
- "level": "OK",
- "message": "load:1.73583984375,cpu:8",
- "description": null
- }
- },
- "threadpool": {
- "source": "management.health.dubbo.status.extras",
- "status": {
- "level": "OK",
- "message": "Pool status:OK, max:200, core:200, largest:0, active:0, task:0, service port: 12345",
- "description": null
- }
- },
- "server": {
- "source": "dubbo@ProtocolConfig.getStatus()",
- "status": {
- "level": "OK",
- "message": "/192.168.1.103:12345(clients:0)",
- "description": null
- }
- }
- }
- // ignore others
-}
-```
-
-
-
-其中 `memory`, `load`, `threadpool` and `server` 是 Dubbo 内建的 `StatusChecker`s,并且 Dubbo 允许应用程序扩展 `StatusChecker`'s SPI.
-
-默认情况, `memory` and `load` 将被添加到 Dubbo 的 `HealthIndicator` , 可以通过外部化配置覆盖默认值,请参考 [`StatusChecker`'s 默认值](#statuschecker-defaults).
-
-
-
-### JMX Endpoint : `healthEndpoint`
-
-
-`dubbo-spring-boot-actuator` 也将暴露健康检查的 JMX Endpoint,它的 `ObjectName` 为 `org.springframework.boot:type=Endpoint,name=healthEndpoint` ,
- 开发人员可以通过 JMX 代理工具 ,比如 `jconsole` 等:
-
-![](JMX_HealthEndpoint.png)
-
-
-
-### 内建 `StatusChecker`s
-
-
-Dubbo 内建 `StatusChecker` 实现定义在 `META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker` 文件中,内容如下 :
-
-```properties
-registry=com.alibaba.dubbo.registry.status.RegistryStatusChecker
-spring=com.alibaba.dubbo.config.spring.status.SpringStatusChecker
-datasource=com.alibaba.dubbo.config.spring.status.DataSourceStatusChecker
-memory=com.alibaba.dubbo.common.status.support.MemoryStatusChecker
-load=com.alibaba.dubbo.common.status.support.LoadStatusChecker
-server=com.alibaba.dubbo.rpc.protocol.dubbo.status.ServerStatusChecker
-threadpool=com.alibaba.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusChecker
-```
-
-
-
-The property key that is name of `StatusChecker` can be a valid value of `management.health.dubbo.status.*` in externalized configuration.
-
-
-
-## Endpoints
-
-
-
-Actuator endpoint `dubbo` supports Spring Web MVC Endpoints :
-
-| URI | HTTP Method | Description | Content Type |
-| ------------------- | ----------- | ----------------------------------- | ------------------ |
-| `/dubbo` | `GET` | Exposes Dubbo's meta data | `application/json` |
-| `/dubbo/properties` | `GET` | Exposes all Dubbo's Properties | `application/json` |
-| `/dubbo/services` | `GET` | Exposes all Dubbo's `ServiceBean` | `application/json` |
-| `/dubbo/references` | `GET` | Exposes all Dubbo's `ReferenceBean` | `application/json` |
-| `/dubbo/configs` | `GET` | Exposes all Dubbo's `*Config` | `application/json` |
-| `/dubbo/shutdown` | `POST` | Shutdown Dubbo services | `application/json` |
-
-
-
-### Endpoint : `/dubbo`
-
-`/dubbo` exposes Dubbo's meta data :
-
-```json
-{
- "timestamp": 1516623290166,
- "versions": {
- "dubbo-spring-boot": "1.0.0"
- "dubbo": "2.5.9"
- },
- "urls": {
- "dubbo": "https://github.com/alibaba/dubbo",
- "google-group": "http://groups.google.com/group/dubbo",
- "github": "https://github.com/dubbo/dubbo-spring-boot-project",
- "issues": "https://github.com/dubbo/dubbo-spring-boot-project/issues",
- "git": "https://github.com/dubbo/dubbo-spring-boot-project.git"
- }
-}
-```
-
-
-
-
-
-### Endpoint : `/dubbo/properties`
-
-`/dubbo/properties` exposes all Dubbo's Properties from Spring Boot Externalized Configuration (a.k.a `PropertySources`) :
-
-```json
-{
- "dubbo.application.id": "dubbo-provider-demo",
- "dubbo.application.name": "dubbo-provider-demo",
- "dubbo.application.qos-enable": "false",
- "dubbo.application.qos-port": "33333",
- "dubbo.protocol.id": "dubbo",
- "dubbo.protocol.name": "dubbo",
- "dubbo.protocol.port": "12345",
- "dubbo.registry.address": "N/A",
- "dubbo.registry.id": "my-registry",
- "dubbo.scan.basePackages": "com.alibaba.boot.dubbo.demo.provider.service"
-}
-```
-
-The structure of JSON is simple Key-Value format , the key is property name as and the value is property value.
-
-
-
-
-
-### Endpoint : `/dubbo/services`
-
-`/dubbo/services` exposes all Dubbo's `ServiceBean` that are declared via `<dubbo:service/>` or `@Service` present in Spring `ApplicationContext` :
-
-```json
-{
- "ServiceBean@com.alibaba.boot.dubbo.demo.api.DemoService#defaultDemoService": {
- "accesslog": null,
- "actives": null,
- "cache": null,
- "callbacks": null,
- "class": "com.alibaba.dubbo.config.spring.ServiceBean",
- "cluster": null,
- "connections": null,
- "delay": null,
- "document": null,
- "executes": null,
- "export": null,
- "exported": true,
- "filter": "",
- "generic": "false",
- "group": null,
- "id": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interface": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interfaceClass": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "layer": null,
- "listener": "",
- "loadbalance": null,
- "local": null,
- "merger": null,
- "mock": null,
- "onconnect": null,
- "ondisconnect": null,
- "owner": null,
- "path": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "proxy": null,
- "retries": null,
- "scope": null,
- "sent": null,
- "stub": null,
- "timeout": null,
- "token": null,
- "unexported": false,
- "uniqueServiceName": "com.alibaba.boot.dubbo.demo.api.DemoService:1.0.0",
- "validation": null,
- "version": "1.0.0",
- "warmup": null,
- "weight": null,
- "serviceClass": "com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService"
- }
-}
-```
-
-The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose value.
-
-
-
-### Endpoint : `/dubbo/references`
-
-`/dubbo/references` exposes all Dubbo's `ReferenceBean` that are declared via `@Reference` annotating on `Field` or `Method ` :
-
-```json
-{
- "private com.alibaba.boot.dubbo.demo.api.DemoService com.alibaba.boot.dubbo.demo.consumer.controller.DemoConsumerController.demoService": {
- "actives": null,
- "cache": null,
- "callbacks": null,
- "class": "com.alibaba.dubbo.config.spring.ReferenceBean",
- "client": null,
- "cluster": null,
- "connections": null,
- "filter": "",
- "generic": null,
- "group": null,
- "id": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interface": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "interfaceClass": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "layer": null,
- "lazy": null,
- "listener": "",
- "loadbalance": null,
- "local": null,
- "merger": null,
- "mock": null,
- "objectType": "com.alibaba.boot.dubbo.demo.api.DemoService",
- "onconnect": null,
- "ondisconnect": null,
- "owner": null,
- "protocol": null,
- "proxy": null,
- "reconnect": null,
- "retries": null,
- "scope": null,
- "sent": null,
- "singleton": true,
- "sticky": null,
- "stub": null,
- "stubevent": null,
- "timeout": null,
- "uniqueServiceName": "com.alibaba.boot.dubbo.demo.api.DemoService:1.0.0",
- "url": "dubbo://localhost:12345",
- "validation": null,
- "version": "1.0.0",
- "invoker": {
- "class": "com.alibaba.dubbo.common.bytecode.proxy0"
- }
- }
-}
-```
-
-The key is the string presentation of `@Reference` `Field` or `Method ` , `ReferenceBean`'s properties compose value.
-
-
-
-### Endpoint : `/dubbo/configs`
-
- `/dubbo/configs` exposes all Dubbo's `*Config` :
-
-```json
-{
- "ApplicationConfig": {
- "dubbo-consumer-demo": {
- "architecture": null,
- "class": "com.alibaba.dubbo.config.ApplicationConfig",
- "compiler": null,
- "dumpDirectory": null,
- "environment": null,
- "id": "dubbo-consumer-demo",
- "logger": null,
- "name": "dubbo-consumer-demo",
- "organization": null,
- "owner": null,
- "version": null
- }
- },
- "ConsumerConfig": {
-
- },
- "MethodConfig": {
-
- },
- "ModuleConfig": {
-
- },
- "MonitorConfig": {
-
- },
- "ProtocolConfig": {
- "dubbo": {
- "accepts": null,
- "accesslog": null,
- "buffer": null,
- "charset": null,
- "class": "com.alibaba.dubbo.config.ProtocolConfig",
- "client": null,
- "codec": null,
- "contextpath": null,
- "dispatcher": null,
- "dispather": null,
- "exchanger": null,
- "heartbeat": null,
- "host": null,
- "id": "dubbo",
- "iothreads": null,
- "name": "dubbo",
- "networker": null,
- "path": null,
- "payload": null,
- "port": 12345,
- "prompt": null,
- "queues": null,
- "serialization": null,
- "server": null,
- "status": null,
- "telnet": null,
- "threadpool": null,
- "threads": null,
- "transporter": null
- }
- },
- "ProviderConfig": {
-
- },
- "ReferenceConfig": {
-
- },
- "RegistryConfig": {
-
- },
- "ServiceConfig": {
-
- }
-}
-```
-
-The key is the simple name of Dubbo `*Config` Class , the value is`*Config` Beans' Name-Properties Map.
-
-
-
-### Endpoint : `/dubbo/shutdown`
-
-`/dubbo/shutdown` shutdowns Dubbo's components including registries, protocols, services and references :
-
-```json
-{
- "shutdown.count": {
- "registries": 0,
- "protocols": 1,
- "services": 0,
- "references": 1
- }
-}
-```
-
-"shutdown.count" means the count of shutdown of Dubbo's components , and the value indicates how many components have been shutdown.
-
-
-
-## Externalized Configuration
-
-
-
-### `StatusChecker` Defaults
-
-
-
-`management.health.dubbo.status.defaults` is a property name for setting names of `StatusChecker`s , its value is allowed to multiple-values , for example :
-
-```properties
-management.health.dubbo.status.defaults = registry,memory,load
-```
-
-
-
-#### Default Value
-
-The default value is :
-
-```properties
-management.health.dubbo.status.defaults = memory,load
-```
-
-
-
-### `StatusChecker` Extras
-
-
-
-`management.health.dubbo.status.extras` is used to override the [ [`StatusChecker`'s defaults]](#statuschecker-defaults) , the multiple-values is delimited by comma :
-
-```properties
-management.health.dubbo.status.extras = load,threadpool
-```
-
-
-
-### Health Checks Enabled
-
-
-
-`management.health.dubbo.enabled` is a enabled configuration to turn on or off health checks feature, its' default is `true`.
-
- If you'd like to disable health checks , you chould apply `management.health.dubbo.enabled` to be `false`:
-
-```properties
-management.health.dubbo.enabled = false
-```
-
-
-
-### Endpoints Enabled
-
-
-
-Dubbo Spring Boot providers actuator endpoint `dubbo` , however it is disable. If you'd like to enable it , please add following property into externalized configuration :
-
-```properties
-# Dubbo Endpoint enabled (default value is false)
-endpoints.dubbo.enabled = true
-```
-
-
-
-### Endpoints Sensitive
-
-Dubbo endpoints contain some sensitive information and significant opeations , thus it's sensitive , that means endpoints maybe protected and authorized if security resolved.
-
-
-
-If you consider it's fine to be public , you can add following property into externalized configuration :
-
-```properties
-# Dubbo Endpoint (default value is true)
-endpoints.dubbo.sensitive = false
-```
-
-> If Spring Security were resolved , configure more :
->
-> ```properties
-> management.security.enabled = false
-> ```
diff --git a/dubbo-spring-boot-actuator/pom.xml b/dubbo-spring-boot-actuator/pom.xml
index 8359cb9..ef7eed3 100644
--- a/dubbo-spring-boot-actuator/pom.xml
+++ b/dubbo-spring-boot-actuator/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,8 +19,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-parent</artifactId>
- <groupId>com.alibaba.boot</groupId>
<version>${revision}</version>
<relativePath>../dubbo-spring-boot-parent/pom.xml</relativePath>
</parent>
@@ -27,12 +28,19 @@
<artifactId>dubbo-spring-boot-actuator</artifactId>
<packaging>jar</packaging>
- <name>Dubbo Spring Boot Actuator</name>
- <description>Dubbo Spring Boot Actuator</description>
+ <name>Apache Dubbo Spring Boot :: Actuator</name>
+ <description>Apache Dubbo Spring Boot Actuator</description>
<dependencies>
<dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-actuator-compatible</artifactId>
+ <version>${revision}</version>
+ </dependency>
+
+ <!-- Spring Boot -->
+ <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<optional>true</optional>
@@ -59,14 +67,14 @@
<!-- Dubbo autoconfigure -->
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${revision}</version>
</dependency>
<!-- Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<optional>true</optional>
</dependency>
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboEndpointsAutoConfiguration.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfiguration.java
similarity index 71%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboEndpointsAutoConfiguration.java
rename to dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfiguration.java
index efa5b41..aa65366 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboEndpointsAutoConfiguration.java
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfiguration.java
@@ -14,15 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.autoconfigure;
+package org.apache.dubbo.spring.boot.actuate.autoconfigure;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboConfigsMetadataEndpoint;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpoint;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboPropertiesEndpoint;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboReferencesMetadataEndpoint;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboServicesMetadataEndpoint;
-import com.alibaba.boot.dubbo.actuate.endpoint.DubboShutdownEndpoint;
-
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboConfigsMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboPropertiesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboReferencesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboServicesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboShutdownEndpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -31,24 +30,23 @@
import org.springframework.context.annotation.PropertySource;
/**
- * Dubbo {@link Endpoint} Auto-{@link Configuration}
- *
+ * Dubbo {@link Endpoint @Endpoint} Auto-{@link Configuration} for Spring Boot Actuator 2.0
*
* @see Endpoint
* @see Configuration
- * @since 0.2.0
+ * @since 2.7.0
*/
@Configuration
@PropertySource(
name = "Dubbo Endpoints Default Properties",
value = "classpath:/META-INF/dubbo-endpoins-default.properties")
-public class DubboEndpointsAutoConfiguration {
+public class DubboEndpointAnnotationAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
- public DubboEndpoint dubboEndpoint() {
- return new DubboEndpoint();
+ public DubboMetadataEndpoint dubboEndpoint() {
+ return new DubboMetadataEndpoint();
}
@Bean
@@ -61,8 +59,8 @@
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
- public DubboPropertiesEndpoint dubboPropertiesEndpoint() {
- return new DubboPropertiesEndpoint();
+ public DubboPropertiesMetadataEndpoint dubboPropertiesEndpoint() {
+ return new DubboPropertiesMetadataEndpoint();
}
@Bean
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboConfigsMetadataEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboConfigsMetadataEndpoint.java
new file mode 100644
index 0000000..0f57fa7
--- /dev/null
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboConfigsMetadataEndpoint.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint;
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboConfigsMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
+import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+
+import java.util.Map;
+
+/**
+ * Dubbo Configs Metadata {@link Endpoint}
+ *
+ * @since 2.7.0
+ */
+@Endpoint(id = "dubboconfigs")
+public class DubboConfigsMetadataEndpoint extends AbstractDubboMetadata {
+
+ @Autowired
+ private DubboConfigsMetadata dubboConfigsMetadata;
+
+ @ReadOperation
+ public Map<String, Map<String, Map<String, Object>>> configs() {
+ return dubboConfigsMetadata.configs();
+ }
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboMetadataEndpoint.java
similarity index 66%
copy from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
copy to dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboMetadataEndpoint.java
index f9b9d1a..d7d4e58 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboMetadataEndpoint.java
@@ -14,29 +14,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
-import java.util.SortedMap;
-
-import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;
+import java.util.Map;
/**
- * Dubbo Properties {@link Endpoint}
+ * Actuator {@link Endpoint} to expose Dubbo Meta Data
*
- *
- * @since 1.0.0
+ * @see Endpoint
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboproperties")
-public class DubboPropertiesEndpoint extends AbstractDubboEndpoint {
+@Endpoint(id = "dubbo")
+public class DubboMetadataEndpoint {
+
+ @Autowired
+ private DubboMetadata dubboMetadata;
@ReadOperation
- public SortedMap<String, Object> properties() {
-
- return filterDubboProperties(environment);
-
+ public Map<String, Object> invoke() {
+ return dubboMetadata.invoke();
}
}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboPropertiesMetadataEndpoint.java
similarity index 68%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
rename to dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboPropertiesMetadataEndpoint.java
index f9b9d1a..6084d3f 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboPropertiesMetadataEndpoint.java
@@ -14,29 +14,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboPropertiesMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import java.util.SortedMap;
-import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;
-
/**
* Dubbo Properties {@link Endpoint}
*
- *
- * @since 1.0.0
+ * @since 2.7.0
*/
@Endpoint(id = "dubboproperties")
-public class DubboPropertiesEndpoint extends AbstractDubboEndpoint {
+public class DubboPropertiesMetadataEndpoint extends AbstractDubboMetadata {
+
+ @Autowired
+ private DubboPropertiesMetadata dubboPropertiesMetadata;
@ReadOperation
public SortedMap<String, Object> properties() {
-
- return filterDubboProperties(environment);
-
+ return dubboPropertiesMetadata.properties();
}
-
}
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java
new file mode 100644
index 0000000..54de83c
--- /dev/null
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboReferencesMetadataEndpoint.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint;
+
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboReferencesMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
+import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+
+import java.util.Map;
+
+/**
+ * Dubbo {@link Reference} Metadata {@link Endpoint}
+ *
+ * @since 2.7.0
+ */
+@Endpoint(id = "dubboreferences")
+public class DubboReferencesMetadataEndpoint extends AbstractDubboMetadata {
+
+ @Autowired
+ private DubboReferencesMetadata dubboReferencesMetadata;
+
+ @ReadOperation
+ public Map<String, Map<String, Object>> references() {
+ return dubboReferencesMetadata.references();
+ }
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java
new file mode 100644
index 0000000..e92f011
--- /dev/null
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboServicesMetadataEndpoint.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint;
+
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboServicesMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
+import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+
+import java.util.Map;
+
+/**
+ * Dubbo {@link Service} Metadata {@link Endpoint}
+ *
+ * @since 2.7.0
+ */
+@Endpoint(id = "dubboservices")
+public class DubboServicesMetadataEndpoint extends AbstractDubboMetadata {
+
+ @Autowired
+ private DubboServicesMetadata dubboServicesMetadata;
+
+ @ReadOperation
+ public Map<String, Map<String, Object>> services() {
+ return dubboServicesMetadata.services();
+ }
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboShutdownEndpoint.java b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboShutdownEndpoint.java
new file mode 100644
index 0000000..b372472
--- /dev/null
+++ b/dubbo-spring-boot-actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboShutdownEndpoint.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint;
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboShutdownMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
+import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
+
+import java.util.Map;
+
+/**
+ * Dubbo Shutdown
+ *
+ * @since 2.7.0
+ */
+@Endpoint(id = "dubboshutdown")
+public class DubboShutdownEndpoint extends AbstractDubboMetadata {
+
+ @Autowired
+ private DubboShutdownMetadata dubboShutdownMetadata;
+
+ @WriteOperation
+ public Map<String, Object> shutdown() throws Exception {
+ return dubboShutdownMetadata.shutdown();
+ }
+
+}
diff --git a/dubbo-spring-boot-actuator/src/main/resources/META-INF/spring.factories b/dubbo-spring-boot-actuator/src/main/resources/META-INF/spring.factories
index ad900ad..53a1bb0 100644
--- a/dubbo-spring-boot-actuator/src/main/resources/META-INF/spring.factories
+++ b/dubbo-spring-boot-actuator/src/main/resources/META-INF/spring.factories
@@ -1,3 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-com.alibaba.boot.dubbo.actuate.autoconfigure.DubboEndpointsAutoConfiguration,\
-com.alibaba.boot.dubbo.actuate.autoconfigure.DubboHealthIndicatorAutoConfiguration
\ No newline at end of file
+org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboEndpointAnnotationAutoConfiguration
\ No newline at end of file
diff --git a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java b/dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfigurationTest.java
similarity index 86%
rename from dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java
rename to dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfigurationTest.java
index 29e2af6..d9747cc 100644
--- a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java
+++ b/dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAnnotationAutoConfigurationTest.java
@@ -14,13 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
-
-import com.alibaba.boot.dubbo.actuate.autoconfigure.DubboEndpointsAutoConfiguration;
-import com.alibaba.dubbo.config.annotation.Service;
+package org.apache.dubbo.spring.boot.actuate.autoconfigure;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboConfigsMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboPropertiesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboReferencesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboServicesMetadataEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboShutdownEndpoint;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -36,15 +40,14 @@
import java.util.function.Supplier;
/**
- * {@link DubboEndpointsAutoConfiguration} Test
+ * {@link DubboEndpointAnnotationAutoConfiguration} Test
*
- * @since 0.2.0
+ * @since 2.7.0
*/
@RunWith(SpringRunner.class)
@SpringBootTest(
classes = {
- DubboEndpointsAutoConfiguration.class,
- DubboEndpointsAutoConfigurationTest.class
+ DubboEndpointAnnotationAutoConfigurationTest.class
},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
@@ -60,7 +63,7 @@
"dubbo.protocol.port=20880",
"dubbo.provider.id=my-provider",
"dubbo.provider.host=127.0.0.1",
- "dubbo.scan.basePackages=com.alibaba.boot.dubbo.actuate.endpoint",
+ "dubbo.scan.basePackages = org.apache.dubbo.spring.boot.actuate.autoconfigure",
"management.endpoint.dubbo.enabled = true",
"management.endpoint.dubboshutdown.enabled = true",
"management.endpoint.dubboconfigs.enabled = true",
@@ -70,16 +73,16 @@
"management.endpoints.web.exposure.include = *",
})
@EnableAutoConfiguration
-public class DubboEndpointsAutoConfigurationTest {
+public class DubboEndpointAnnotationAutoConfigurationTest {
@Autowired
- private DubboEndpoint dubboEndpoint;
+ private DubboMetadataEndpoint dubboEndpoint;
@Autowired
private DubboConfigsMetadataEndpoint dubboConfigsMetadataEndpoint;
@Autowired
- private DubboPropertiesEndpoint dubboPropertiesEndpoint;
+ private DubboPropertiesMetadataEndpoint dubboPropertiesEndpoint;
@Autowired
private DubboReferencesMetadataEndpoint dubboReferencesMetadataEndpoint;
@@ -156,7 +159,7 @@
Assert.assertEquals(1, services.size());
- Map<String, Object> demoServiceMeta = services.get("ServiceBean:com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpointsAutoConfigurationTest$DemoService:1.0.0");
+ Map<String, Object> demoServiceMeta = services.get("ServiceBean:org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboEndpointAnnotationAutoConfigurationTest$DemoService:1.0.0");
Assert.assertEquals("1.0.0", demoServiceMeta.get("version"));
@@ -187,7 +190,7 @@
Assert.assertEquals("20880", properties.get("dubbo.protocol.port"));
Assert.assertEquals("my-provider", properties.get("dubbo.provider.id"));
Assert.assertEquals("127.0.0.1", properties.get("dubbo.provider.host"));
- Assert.assertEquals("com.alibaba.boot.dubbo.actuate.endpoint", properties.get("dubbo.scan.basePackages"));
+ Assert.assertEquals("org.apache.dubbo.spring.boot.actuate.autoconfigure", properties.get("dubbo.scan.basePackages"));
}
@Test
@@ -206,6 +209,10 @@
}
+ interface DemoService {
+ String sayHello(String name);
+ }
+
@Service(
version = "${dubbo.service.version}",
application = "${dubbo.application.id}",
@@ -220,9 +227,5 @@
}
- interface DemoService {
- String sayHello(String name);
- }
-
}
diff --git a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointTest.java b/dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpointTest.java
similarity index 84%
rename from dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointTest.java
rename to dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpointTest.java
index 0cdfb21..040ccf4 100644
--- a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointTest.java
+++ b/dubbo-spring-boot-actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpointTest.java
@@ -14,39 +14,39 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint;
-import com.alibaba.boot.dubbo.util.DubboUtils;
-
+import org.apache.dubbo.spring.boot.util.DubboUtils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Map;
-import static com.alibaba.dubbo.common.Version.getVersion;
+import static org.apache.dubbo.common.Version.getVersion;
/**
- * {@link DubboEndpoint} Test
+ * {@link DubboMetadataEndpoint} Test
*
- *
- * @see DubboEndpoint
- * @since 1.0.0
+ * @see DubboMetadataEndpoint
+ * @since 2.7.0
*/
@RunWith(SpringRunner.class)
@SpringBootTest(
classes = {
- DubboEndpoint.class
+ DubboMetadataEndpoint.class
}
)
+@EnableAutoConfiguration
public class DubboEndpointTest {
@Autowired
- private DubboEndpoint dubboEndpoint;
+ private DubboMetadataEndpoint dubboEndpoint;
@Test
public void testInvoke() {
diff --git a/dubbo-spring-boot-autoconfigure/README.md b/dubbo-spring-boot-autoconfigure/README.md
index 0b461ce..e27178d 100644
--- a/dubbo-spring-boot-autoconfigure/README.md
+++ b/dubbo-spring-boot-autoconfigure/README.md
@@ -21,19 +21,19 @@
```xml
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
- <version>0.2.1</version>
+ <version>2.7.0</version>
</dependency>
```
If your project failed to resolve the dependency, try to add the following repository:
-
```xml
<repositories>
<repository>
- <id>sonatype-nexus-snapshots</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
@@ -50,7 +50,7 @@
Since `2.5.7` , Dubbo totally supports Annotation-Driven , core Dubbo's components that are registered and initialized in Spring application context , including exterialized configuration features. However , those features need to trigger in manual configuration , e.g `@DubboComponentScan` , `@EnableDubboConfig` or `@EnableDubbo`.
-> If you'd like to learn more , please read [Dubbo Annotation-Driven (Chinese)](https://github.com/mercyblitz/blogs/blob/master/java/dubbo/Dubbo-Annotation-Driven.md)
+> If you'd like to learn more , please read [Dubbo Annotation-Driven (Chinese)](http://dubbo.apache.org/zh-cn/blog/dubbo-annotation-driven.html)
@@ -62,7 +62,7 @@
Externalized Configuration is a core feature of Spring Boot , Dubbo Spring Boot not only supports it definitely , but also inherits Dubbo's Externalized Configuration, thus it provides single and multiple Dubbo's `*Config` Bindings from `PropertySources` , and `"dubbo."` is a common prefix of property name.
-> If you'd like to learn more , please read [Dubbo Externalized Configuration](https://github.com/mercyblitz/blogs/blob/master/java/dubbo/Dubbo-Externalized-Configuration.md)(Chinese).
+> If you'd like to learn more , please read [Dubbo Externalized Configuration](http://dubbo.apache.org/zh-cn/blog/dubbo-externalized-configuration.html)(Chinese).
@@ -213,13 +213,13 @@
#### Case 1 - Single Bindings
-![](../config-popup-window.png)
+![](config-popup-window.png)
#### Case 2 - Mutiple Bindings
-![](../mconfig-popup-window.png)
+![](mconfig-popup-window.png)
diff --git a/config-popup-window.png b/dubbo-spring-boot-autoconfigure/config-popup-window.png
similarity index 100%
rename from config-popup-window.png
rename to dubbo-spring-boot-autoconfigure/config-popup-window.png
Binary files differ
diff --git a/mconfig-popup-window.png b/dubbo-spring-boot-autoconfigure/mconfig-popup-window.png
similarity index 100%
rename from mconfig-popup-window.png
rename to dubbo-spring-boot-autoconfigure/mconfig-popup-window.png
Binary files differ
diff --git a/dubbo-spring-boot-autoconfigure/pom.xml b/dubbo-spring-boot-autoconfigure/pom.xml
index f9e933a..83f1a4b 100644
--- a/dubbo-spring-boot-autoconfigure/pom.xml
+++ b/dubbo-spring-boot-autoconfigure/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-parent</artifactId>
<version>${revision}</version>
<relativePath>../dubbo-spring-boot-parent/pom.xml</relativePath>
@@ -27,11 +28,19 @@
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<packaging>jar</packaging>
- <name>Dubbo Spring Boot Auto-Configure</name>
- <description>Dubbo Spring Boot Auto-Configure</description>
+ <name>Apache Dubbo Spring Boot :: Auto-Configure</name>
+ <description>Apache Dubbo Spring Boot Auto-Configure</description>
<dependencies>
+
+ <!-- Spring Boot Auto-Configuration -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
+ <version>${revision}</version>
+ </dependency>
+
<!-- Spring Boot dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -54,17 +63,11 @@
<!-- Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<optional>true</optional>
</dependency>
- <!-- Alibaba Spring Context extension -->
- <dependency>
- <groupId>com.alibaba.spring</groupId>
- <artifactId>spring-context-support</artifactId>
- </dependency>
-
<!-- Test Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfiguration.java b/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfiguration.java
deleted file mode 100644
index 58029f4..0000000
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfiguration.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.autoconfigure;
-
-import com.alibaba.dubbo.config.AbstractConfig;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.dubbo.config.annotation.Service;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
-import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;
-import com.alibaba.dubbo.config.spring.context.annotation.DubboConfigConfiguration;
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubboConfig;
-
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.bind.Binder;
-import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-import org.springframework.core.env.Environment;
-
-import java.util.Set;
-
-import static com.alibaba.boot.dubbo.util.DubboUtils.BASE_PACKAGES_PROPERTY_NAME;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_PREFIX;
-import static com.alibaba.boot.dubbo.util.DubboUtils.MULTIPLE_CONFIG_PROPERTY_NAME;
-import static java.util.Collections.emptySet;
-import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
-
-/**
- * Dubbo Auto {@link Configuration}
- *
- * @see ApplicationConfig
- * @see Service
- * @see Reference
- * @see DubboComponentScan
- * @see EnableDubboConfig
- * @see EnableDubbo
- * @since 1.0.0
- */
-@Configuration
-@ConditionalOnProperty(prefix = DUBBO_PREFIX, name = "enabled", matchIfMissing = true, havingValue = "true")
-@ConditionalOnClass(AbstractConfig.class)
-public class DubboAutoConfiguration {
-
- /**
- * Creates {@link ServiceAnnotationBeanPostProcessor} Bean
- *
- * @param environment {@link Environment} Bean
- * @return {@link ServiceAnnotationBeanPostProcessor}
- */
- @ConditionalOnProperty(name = BASE_PACKAGES_PROPERTY_NAME)
- @ConditionalOnClass(ConfigurationPropertySources.class)
- @Bean
- public ServiceAnnotationBeanPostProcessor serviceAnnotationBeanPostProcessor(Environment environment) {
- Set<String> packagesToScan = environment.getProperty(BASE_PACKAGES_PROPERTY_NAME, Set.class, emptySet());
- return new ServiceAnnotationBeanPostProcessor(packagesToScan);
- }
-
- @ConditionalOnClass(Binder.class)
- @Bean
- @Scope(scopeName = SCOPE_PROTOTYPE)
- public RelaxedDubboConfigBinder relaxedDubboConfigBinder() {
- return new RelaxedDubboConfigBinder();
- }
-
- /**
- * Creates {@link ReferenceAnnotationBeanPostProcessor} Bean if Absent
- *
- * @return {@link ReferenceAnnotationBeanPostProcessor}
- */
- @ConditionalOnMissingBean
- @Bean(name = ReferenceAnnotationBeanPostProcessor.BEAN_NAME)
- public ReferenceAnnotationBeanPostProcessor referenceAnnotationBeanPostProcessor() {
- return new ReferenceAnnotationBeanPostProcessor();
- }
-
- /**
- * Single Dubbo Config Configuration
- *
- * @see EnableDubboConfig
- * @see DubboConfigConfiguration.Single
- */
- @EnableDubboConfig
- protected static class SingleDubboConfigConfiguration {
- }
-
- /**
- * Multiple Dubbo Config Configuration , equals @EnableDubboConfig.multiple() == <code>true</code>
- *
- * @see EnableDubboConfig
- * @see DubboConfigConfiguration.Multiple
- */
- @ConditionalOnProperty(name = MULTIPLE_CONFIG_PROPERTY_NAME, havingValue = "true")
- @EnableDubboConfig(multiple = true)
- protected static class MultipleDubboConfigConfiguration {
- }
-
-}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinder.java b/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinder.java
similarity index 89%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinder.java
rename to dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinder.java
index 72a66e7..b5d8962 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinder.java
+++ b/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinder.java
@@ -14,12 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.autoconfigure;
+package org.apache.dubbo.spring.boot.autoconfigure;
-import com.alibaba.dubbo.config.AbstractConfig;
-import com.alibaba.dubbo.config.spring.context.properties.AbstractDubboConfigBinder;
-import com.alibaba.dubbo.config.spring.context.properties.DubboConfigBinder;
-
+import org.apache.dubbo.config.AbstractConfig;
+import org.apache.dubbo.config.spring.context.properties.AbstractDubboConfigBinder;
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
import org.springframework.boot.context.properties.bind.BindHandler;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
@@ -36,9 +35,9 @@
* Spring Boot Relaxed {@link DubboConfigBinder} implementation
* see org.springframework.boot.context.properties.ConfigurationPropertiesBinder
*
- * @since 0.1.1
+ * @since 2.7.0
*/
-public class RelaxedDubboConfigBinder extends AbstractDubboConfigBinder {
+class BinderDubboConfigBinder extends AbstractDubboConfigBinder {
@Override
public <C extends AbstractConfig> void bind(String prefix, C dubboConfig) {
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfiguration.java b/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfiguration.java
new file mode 100644
index 0000000..97aa275
--- /dev/null
+++ b/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfiguration.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
+import org.apache.dubbo.config.spring.util.PropertySourcesUtils;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+import org.springframework.core.env.AbstractEnvironment;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.MutablePropertySources;
+import org.springframework.core.env.PropertyResolver;
+
+import java.util.Map;
+
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SCAN_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME;
+import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
+
+/**
+ * Dubbo Relaxed Binding Auto-{@link Configuration} for Spring Boot 2.0
+ *
+ * @see DubboRelaxedBindingAutoConfiguration
+ * @since 2.7.0
+ */
+@Configuration
+@ConditionalOnProperty(prefix = DUBBO_PREFIX, name = "enabled", matchIfMissing = true)
+@ConditionalOnClass(name = "org.springframework.boot.context.properties.bind.Binder")
+@AutoConfigureBefore(DubboRelaxedBindingAutoConfiguration.class)
+public class DubboRelaxedBinding2AutoConfiguration {
+
+ @Bean(name = BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME)
+ public PropertyResolver dubboScanBasePackagesPropertyResolver(ConfigurableEnvironment environment) {
+ ConfigurableEnvironment propertyResolver = new AbstractEnvironment() {
+ protected void customizePropertySources(MutablePropertySources propertySources) {
+ Map<String, Object> dubboScanProperties = PropertySourcesUtils.getSubProperties(environment, DUBBO_SCAN_PREFIX);
+ propertySources.addLast(new MapPropertySource("dubboScanProperties", dubboScanProperties));
+ }
+ };
+ ConfigurationPropertySources.attach(propertyResolver);
+ return propertyResolver;
+ }
+
+ @ConditionalOnMissingBean(name = RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME, value = DubboConfigBinder.class)
+ @Bean(RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME)
+ @Scope(scopeName = SCOPE_PROTOTYPE)
+ public DubboConfigBinder relaxedDubboConfigBinder() {
+ return new BinderDubboConfigBinder();
+ }
+
+}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json b/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json
deleted file mode 100644
index 7ce2cee..0000000
--- a/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json
+++ /dev/null
@@ -1,1098 +0,0 @@
-{
- "hints": [],
- "groups": [],
- "properties": [
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.architecture",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.compiler",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.dump-directory",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.environment",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.logger",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.monitor",
- "type": "com.alibaba.dubbo.config.MonitorConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.name",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.organization",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.owner",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.qos-accept-foreign-ip",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.qos-enable",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.qos-port",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.registries",
- "type": "java.util.List<com.alibaba.dubbo.config.RegistryConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.registry",
- "type": "com.alibaba.dubbo.config.RegistryConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ApplicationConfig",
- "name": "dubbo.application.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.applications",
- "description": "Multiple {@link ApplicationConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.ApplicationConfig>"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.DubboConfigProperties",
- "name": "dubbo.config.multiple",
- "description": "Indicates multiple properties binding from externalized configuration or not.",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.DubboConfigProperties",
- "name": "dubbo.config.override",
- "description": "Indicates override {@link ConfigUtils#getProperties() Dubbo config properties} from externalized configuration\n or not.",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.actives",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.application",
- "type": "com.alibaba.dubbo.config.ApplicationConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.async",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.cache",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.callbacks",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.check",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.client",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.cluster",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.connections",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.filter",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.generic",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.group",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.init",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "deprecated": true,
- "name": "dubbo.consumer.injvm",
- "type": "java.lang.Boolean",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.layer",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.lazy",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.listener",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.loadbalance",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "deprecated": true,
- "name": "dubbo.consumer.local",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.merger",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.mock",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.module",
- "type": "com.alibaba.dubbo.config.ModuleConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.monitor",
- "type": "com.alibaba.dubbo.config.MonitorConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.onconnect",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.ondisconnect",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.owner",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.proxy",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.reconnect",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.registries",
- "type": "java.util.List<com.alibaba.dubbo.config.RegistryConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.registry",
- "type": "com.alibaba.dubbo.config.RegistryConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.retries",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.scope",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.sent",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.sticky",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.stub",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.timeout",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.validation",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ConsumerConfig",
- "name": "dubbo.consumer.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.consumers",
- "description": "Multiple {@link ConsumerConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.ConsumerConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.monitor",
- "type": "com.alibaba.dubbo.config.MonitorConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.name",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.organization",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.owner",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.registries",
- "type": "java.util.List<com.alibaba.dubbo.config.RegistryConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.registry",
- "type": "com.alibaba.dubbo.config.RegistryConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ModuleConfig",
- "name": "dubbo.module.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.modules",
- "description": "Multiple {@link ModuleConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.ModuleConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.address",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.group",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.password",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.protocol",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.username",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.MonitorConfig",
- "name": "dubbo.monitor.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.monitors",
- "description": "Multiple {@link MonitorConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.MonitorConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.accepts",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.accesslog",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.buffer",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.charset",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.client",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.codec",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.contextpath",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.dispatcher",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "deprecated": true,
- "name": "dubbo.protocol.dispather",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.exchanger",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.heartbeat",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.host",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.iothreads",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.name",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.networker",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "deprecated": true,
- "name": "dubbo.protocol.path",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.payload",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.port",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.prompt",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.queues",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.register",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.serialization",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.server",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.status",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.telnet",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.threadpool",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.threads",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProtocolConfig",
- "name": "dubbo.protocol.transporter",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.protocols",
- "description": "Multiple {@link ProtocolConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.ProtocolConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.accepts",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.accesslog",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.actives",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.application",
- "type": "com.alibaba.dubbo.config.ApplicationConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.async",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.buffer",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.cache",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.callbacks",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.charset",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.client",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.cluster",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.codec",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.connections",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.contextpath",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "deprecated": true,
- "name": "dubbo.provider.default",
- "type": "java.lang.Boolean",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.delay",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.deprecated",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.dispatcher",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "deprecated": true,
- "name": "dubbo.provider.dispather",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.document",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.dynamic",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.exchanger",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.executes",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.export",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.filter",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.group",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.host",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.iothreads",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.layer",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.listener",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.loadbalance",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "deprecated": true,
- "name": "dubbo.provider.local",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.merger",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.mock",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.module",
- "type": "com.alibaba.dubbo.config.ModuleConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.monitor",
- "type": "com.alibaba.dubbo.config.MonitorConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.networker",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.onconnect",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.ondisconnect",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.owner",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "deprecated": true,
- "name": "dubbo.provider.path",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.payload",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "deprecated": true,
- "name": "dubbo.provider.port",
- "type": "java.lang.Integer",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.prompt",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.protocol",
- "type": "com.alibaba.dubbo.config.ProtocolConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.protocols",
- "type": "java.util.List<com.alibaba.dubbo.config.ProtocolConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.proxy",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.queues",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.register",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.registries",
- "type": "java.util.List<com.alibaba.dubbo.config.RegistryConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.registry",
- "type": "com.alibaba.dubbo.config.RegistryConfig"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.retries",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.scope",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.sent",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.serialization",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.server",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.status",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.stub",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.telnet",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.threadpool",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.threads",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.timeout",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.token",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.transporter",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.validation",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.wait",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.warmup",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.ProviderConfig",
- "name": "dubbo.provider.weight",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.providers",
- "description": "Multiple {@link ProviderConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.ProviderConfig>"
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.MultipleDubboConfigBindingProperties",
- "name": "dubbo.registries",
- "description": "Multiple {@link RegistryConfig} property",
- "type": "java.util.Map<java.lang.String,com.alibaba.dubbo.config.RegistryConfig>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.address",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.check",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.client",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.cluster",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.default",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.dynamic",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.file",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.group",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.id",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.parameters",
- "type": "java.util.Map<java.lang.String,java.lang.String>"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.password",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.port",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.protocol",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.register",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.server",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.session",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.subscribe",
- "type": "java.lang.Boolean"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.timeout",
- "type": "java.lang.Integer"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "deprecated": true,
- "name": "dubbo.registry.transport",
- "type": "java.lang.String",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.transporter",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.username",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "name": "dubbo.registry.version",
- "type": "java.lang.String"
- },
- {
- "sourceType": "com.alibaba.dubbo.config.RegistryConfig",
- "deprecated": true,
- "name": "dubbo.registry.wait",
- "type": "java.lang.Integer",
- "deprecation": {}
- },
- {
- "sourceType": "com.alibaba.boot.dubbo.autoconfigure.DubboScanProperties",
- "name": "dubbo.scan.base-packages",
- "description": "The base-packages to scan , the multiple-value is delimited by comma\n\n @see EnableDubbo#scanBasePackages()",
- "type": "java.util.Set<java.lang.String>"
- }
- ]
-}
\ No newline at end of file
diff --git a/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories b/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories
index 4ea2a1a..c88a29b 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories
+++ b/dubbo-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories
@@ -1,11 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration
-
-
-org.springframework.context.ApplicationListener=\
-com.alibaba.boot.dubbo.context.event.OverrideDubboConfigApplicationListener,\
-com.alibaba.boot.dubbo.context.event.WelcomeLogoApplicationListener,\
-com.alibaba.boot.dubbo.context.event.AwaitingNonWebApplicationListener
-
-org.springframework.boot.env.EnvironmentPostProcessor=\
-com.alibaba.boot.dubbo.env.DubboDefaultPropertiesEnvironmentPostProcessor
\ No newline at end of file
+org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBinding2AutoConfiguration
\ No newline at end of file
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/DubboUtilsTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/DubboUtilsTest.java
deleted file mode 100644
index c972dc8..0000000
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/DubboUtilsTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.util;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.springframework.mock.env.MockEnvironment;
-
-import java.util.SortedMap;
-
-import static com.alibaba.boot.dubbo.util.DubboUtils.BASE_PACKAGES_PROPERTY_NAME;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_CONFIG_PREFIX;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_MAILING_LIST;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_PREFIX;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SCAN_PREFIX;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_GIT_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_ISSUES_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.MULTIPLE_CONFIG_PROPERTY_NAME;
-import static com.alibaba.boot.dubbo.util.DubboUtils.OVERRIDE_CONFIG_PROPERTY_NAME;
-import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;
-
-/**
- * {@link DubboUtils} Test
- *
- *
- * @see DubboUtils
- * @since 1.0.0
- */
-public class DubboUtilsTest {
-
- @Test
- public void testConstants() {
-
- Assert.assertEquals("dubbo", DUBBO_PREFIX);
-
- Assert.assertEquals("dubbo.scan", DUBBO_SCAN_PREFIX);
-
- Assert.assertEquals("dubbo.scan.base-packages", BASE_PACKAGES_PROPERTY_NAME);
-
- Assert.assertEquals("dubbo.config", DUBBO_CONFIG_PREFIX);
-
- Assert.assertEquals("dubbo.config.multiple", MULTIPLE_CONFIG_PROPERTY_NAME);
-
- Assert.assertEquals("dubbo.config.override", OVERRIDE_CONFIG_PROPERTY_NAME);
-
- Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project", DUBBO_SPRING_BOOT_GITHUB_URL);
- Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project.git", DUBBO_SPRING_BOOT_GIT_URL);
- Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project/issues", DUBBO_SPRING_BOOT_ISSUES_URL);
-
- Assert.assertEquals("https://github.com/apache/incubator-dubbo", DUBBO_GITHUB_URL);
-
- Assert.assertEquals("dev@dubbo.apache.org", DUBBO_MAILING_LIST);
-
- Assert.assertFalse(DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE);
-
- Assert.assertTrue(DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE);
-
- }
-
-
- @Test
- public void testFilterDubboProperties() {
-
- MockEnvironment environment = new MockEnvironment();
- environment.setProperty("message", "Hello,World");
- environment.setProperty(MULTIPLE_CONFIG_PROPERTY_NAME, "true");
- environment.setProperty(OVERRIDE_CONFIG_PROPERTY_NAME, "true");
-
- SortedMap<String, Object> dubboProperties = filterDubboProperties(environment);
-
- Assert.assertEquals("true",dubboProperties.get(MULTIPLE_CONFIG_PROPERTY_NAME));
- Assert.assertEquals("true",dubboProperties.get(OVERRIDE_CONFIG_PROPERTY_NAME));
-
- }
-
-}
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinderTest.java
similarity index 77%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java
rename to dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinderTest.java
index 0a151ba..8005302 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java
+++ b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/BinderDubboConfigBinderTest.java
@@ -14,33 +14,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.autoconfigure;
+package org.apache.dubbo.spring.boot.autoconfigure;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.RegistryConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
/**
- * {@link RelaxedDubboConfigBinder} Test
+ * {@link BinderDubboConfigBinder} Test
*
- *
- * @since 0.1.1
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(locations = "classpath:/dubbo.properties")
-@ContextConfiguration(classes = RelaxedDubboConfigBinder.class)
-public class RelaxedDubboConfigBinderTest {
+@ContextConfiguration(classes = BinderDubboConfigBinder.class)
+public class BinderDubboConfigBinderTest {
@Autowired
- private RelaxedDubboConfigBinder dubboConfigBinder;
+ private BinderDubboConfigBinder dubboConfigBinder;
@Test
public void testBinder() {
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfigurationTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfigurationTest.java
new file mode 100644
index 0000000..4aee5a5
--- /dev/null
+++ b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfigurationTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.core.env.PropertyResolver;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.ClassUtils;
+
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME;
+
+/**
+ * {@link DubboRelaxedBinding2AutoConfiguration} Test
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = DubboRelaxedBinding2AutoConfigurationTest.class, properties = {
+ "dubbo.scan.basePackages = org.apache.dubbo.spring.boot.autoconfigure"
+})
+@EnableAutoConfiguration
+public class DubboRelaxedBinding2AutoConfigurationTest {
+
+ @Autowired
+ @Qualifier(BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME)
+ private PropertyResolver propertyResolver;
+
+ @Autowired
+ @Qualifier(RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME)
+ private DubboConfigBinder dubboConfigBinder;
+
+ @Autowired
+ private ObjectProvider<ServiceAnnotationBeanPostProcessor> serviceAnnotationBeanPostProcessor;
+
+ @Autowired
+ private ObjectProvider<ReferenceAnnotationBeanPostProcessor> referenceAnnotationBeanPostProcessor;
+
+ @Test
+ public void testBeans() {
+ Assert.assertTrue(ClassUtils.isAssignableValue(BinderDubboConfigBinder.class, dubboConfigBinder));
+ Assert.assertNotNull(serviceAnnotationBeanPostProcessor);
+ Assert.assertNotNull(serviceAnnotationBeanPostProcessor.getIfAvailable());
+ Assert.assertNotNull(referenceAnnotationBeanPostProcessor);
+ Assert.assertNotNull(referenceAnnotationBeanPostProcessor.getIfAvailable());
+ }
+
+}
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
similarity index 97%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java
rename to dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
index 42710cd..e4064b9 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java
+++ b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
import org.junit.Assert;
import org.junit.Test;
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
similarity index 98%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
rename to dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
index d941a4f..2fbb6aa 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
+++ b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.env;
+package org.apache.dubbo.spring.boot.env;
import org.junit.Assert;
import org.junit.Test;
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
similarity index 96%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java
rename to dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
index 9155471..2ca3766 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java
+++ b/dubbo-spring-boot-autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.util;
+package org.apache.dubbo.spring.boot.util;
import org.junit.Assert;
import org.junit.Test;
@@ -29,9 +29,8 @@
/**
* {@link EnvironmentUtils} Test
*
- *
* @see EnvironmentUtils
- * @since 1.0.0
+ * @since 2.7.0
*/
public class EnvironmentUtilsTest {
diff --git a/dubbo-spring-boot-compatible/actuator/pom.xml b/dubbo-spring-boot-compatible/actuator/pom.xml
new file mode 100644
index 0000000..60fbd2f
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/pom.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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
+
+ http://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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-compatible</artifactId>
+ <version>${revision}</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>dubbo-spring-boot-actuator-compatible</artifactId>
+ <name>Apache Dubbo Spring Boot :: Compatible :: Actuator</name>
+ <description>Apache Dubbo Spring Boot Compatible for Spring Boot 1.x Actuator</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- @ConfigurationProperties annotation processing (metadata for IDEs) -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-configuration-processor</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- Dubbo autoconfigure -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
+ <version>${revision}</version>
+ </dependency>
+
+ <!-- Dubbo -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfiguration.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfiguration.java
new file mode 100644
index 0000000..a74cab1
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfiguration.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.autoconfigure;
+
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboEndpoint;
+import org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration;
+import org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBindingAutoConfiguration;
+import org.springframework.boot.actuate.condition.ConditionalOnEnabledEndpoint;
+import org.springframework.boot.actuate.endpoint.Endpoint;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Dubbo {@link Endpoint} Auto Configuration is compatible with Spring Boot Actuator 1.x
+ *
+ * @since 2.7.0
+ */
+@Configuration
+@ConditionalOnClass(name = {
+ "org.springframework.boot.actuate.endpoint.Endpoint" // Spring Boot 1.x
+})
+@AutoConfigureAfter(value = {
+ DubboAutoConfiguration.class,
+ DubboRelaxedBindingAutoConfiguration.class
+})
+public class DubboEndpointAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
+ @ConditionalOnEnabledEndpoint(value = "dubbo")
+ public DubboEndpoint dubboEndpoint() {
+ return new DubboEndpoint();
+ }
+}
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointMetadataAutoConfiguration.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointMetadataAutoConfiguration.java
new file mode 100644
index 0000000..d525e98
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointMetadataAutoConfiguration.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.autoconfigure;
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.AbstractDubboMetadata;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Dubbo Endpoints Metadata Auto-{@link Configuration}
+ */
+@ConditionalOnClass(name = {
+ "org.springframework.boot.actuate.health.Health" // If spring-boot-actuator is present
+})
+@Configuration
+@AutoConfigureAfter(name = {
+ "org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration",
+ "org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBindingAutoConfiguration"
+})
+@ComponentScan(basePackageClasses = AbstractDubboMetadata.class)
+public class DubboEndpointMetadataAutoConfiguration {
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java
similarity index 66%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java
index 20d2cf1..333954b 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboHealthIndicatorAutoConfiguration.java
@@ -14,19 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.autoconfigure;
+package org.apache.dubbo.spring.boot.actuate.autoconfigure;
-import com.alibaba.boot.dubbo.actuate.health.DubboHealthIndicator;
-import com.alibaba.boot.dubbo.actuate.health.DubboHealthIndicatorProperties;
-import com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration;
-
-import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
-import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
+import org.apache.dubbo.spring.boot.actuate.health.DubboHealthIndicator;
+import org.apache.dubbo.spring.boot.actuate.health.DubboHealthIndicatorProperties;
import org.springframework.boot.actuate.health.HealthIndicator;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -34,15 +29,14 @@
/**
* Dubbo {@link DubboHealthIndicator} Auto Configuration
*
- *
* @see HealthIndicator
- * @since 1.0.0
+ * @since 2.7.0
*/
@Configuration
-@ConditionalOnClass({HealthIndicator.class})
-@AutoConfigureBefore({EndpointAutoConfiguration.class})
-@AutoConfigureAfter(DubboAutoConfiguration.class)
-@ConditionalOnEnabledHealthIndicator("dubbo")
+@ConditionalOnClass(name = {
+ "org.springframework.boot.actuate.health.Health"
+})
+@ConditionalOnProperty(name = "management.health.dubbo.enabled", matchIfMissing = true, havingValue = "true")
@EnableConfigurationProperties(DubboHealthIndicatorProperties.class)
public class DubboHealthIndicatorAutoConfiguration {
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboMvcEndpointManagementContextConfiguration.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboMvcEndpointManagementContextConfiguration.java
new file mode 100644
index 0000000..cfe537c
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboMvcEndpointManagementContextConfiguration.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.autoconfigure;
+
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.mvc.DubboMvcEndpoint;
+import org.springframework.boot.actuate.autoconfigure.ManagementContextConfiguration;
+import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
+import org.springframework.context.annotation.Bean;
+
+/**
+ * Dubbo {@link MvcEndpoint} {@link ManagementContextConfiguration} for Spring Boot 1.x
+ *
+ * @since 2.7.0
+ */
+@ManagementContextConfiguration
+@ConditionalOnClass(name = {
+ "org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter"
+})
+@ConditionalOnWebApplication
+public class DubboMvcEndpointManagementContextConfiguration {
+
+ @Bean
+ @ConditionalOnBean(DubboEndpoint.class)
+ @ConditionalOnMissingBean
+ public DubboMvcEndpoint dubboMvcEndpoint(DubboEndpoint dubboEndpoint) {
+ return new DubboMvcEndpoint(dubboEndpoint);
+ }
+}
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpoint.java
new file mode 100644
index 0000000..0e0aa75
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/DubboEndpoint.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint;
+
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboMetadata;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
+import org.springframework.boot.actuate.endpoint.Endpoint;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import java.util.Map;
+
+/**
+ * Actuator {@link Endpoint} to expose Dubbo Meta Data
+ *
+ * @see Endpoint
+ * @since 2.7.0
+ */
+@ConfigurationProperties(prefix = "endpoints.dubbo", ignoreUnknownFields = false)
+public class DubboEndpoint extends AbstractEndpoint<Map<String, Object>> {
+
+ @Autowired
+ private DubboMetadata dubboMetadata;
+
+ public DubboEndpoint() {
+ super("dubbo", true, false);
+ }
+
+ @Override
+ public Map<String, Object> invoke() {
+ return dubboMetadata.invoke();
+ }
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/AbstractDubboEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java
similarity index 86%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/AbstractDubboEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java
index 45a0cba..fb4e01f 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/AbstractDubboEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java
@@ -14,14 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.spring.ServiceBean;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
-
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.spring.ServiceBean;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
import org.springframework.beans.BeansException;
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.EnvironmentAware;
@@ -39,22 +37,32 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import static com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.BEAN_NAME;
+import static org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.BEAN_NAME;
import static org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors;
import static org.springframework.util.ClassUtils.isPrimitiveOrWrapper;
/**
- * Abstract Dubbo {@link Endpoint @Endpoint}
+ * Abstract Dubbo Meatadata
*
- *
- * @since 0.2.0
+ * @since 2.7.0
*/
-public abstract class AbstractDubboEndpoint implements ApplicationContextAware, EnvironmentAware {
+public abstract class AbstractDubboMetadata implements ApplicationContextAware, EnvironmentAware {
protected ApplicationContext applicationContext;
protected ConfigurableEnvironment environment;
+ private static boolean isSimpleType(Class<?> type) {
+ return isPrimitiveOrWrapper(type)
+ || type == String.class
+ || type == BigDecimal.class
+ || type == BigInteger.class
+ || type == Date.class
+ || type == URL.class
+ || type == Class.class
+ ;
+ }
+
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
@@ -110,16 +118,5 @@
return beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class);
}
- private static boolean isSimpleType(Class<?> type) {
- return isPrimitiveOrWrapper(type)
- || type == String.class
- || type == BigDecimal.class
- || type == BigInteger.class
- || type == Date.class
- || type == URL.class
- || type == Class.class
- ;
- }
-
}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboConfigsMetadataEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboConfigsMetadata.java
similarity index 74%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboConfigsMetadataEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboConfigsMetadata.java
index 28b276a..46de93e 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboConfigsMetadataEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboConfigsMetadata.java
@@ -14,22 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.dubbo.config.AbstractConfig;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ConsumerConfig;
-import com.alibaba.dubbo.config.MethodConfig;
-import com.alibaba.dubbo.config.ModuleConfig;
-import com.alibaba.dubbo.config.MonitorConfig;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.ProviderConfig;
-import com.alibaba.dubbo.config.ReferenceConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-import com.alibaba.dubbo.config.ServiceConfig;
-
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+import org.apache.dubbo.config.AbstractConfig;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ConsumerConfig;
+import org.apache.dubbo.config.MethodConfig;
+import org.apache.dubbo.config.ModuleConfig;
+import org.apache.dubbo.config.MonitorConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.ProviderConfig;
+import org.apache.dubbo.config.ReferenceConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.ServiceConfig;
+import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -38,15 +36,13 @@
import static org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors;
/**
- * Dubbo Configs Metadata {@link Endpoint}
+ * Dubbo Configs Metadata
*
- *
- * @since 0.2.0
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboconfigs")
-public class DubboConfigsMetadataEndpoint extends AbstractDubboEndpoint {
+@Component
+public class DubboConfigsMetadata extends AbstractDubboMetadata {
- @ReadOperation
public Map<String, Map<String, Map<String, Object>>> configs() {
Map<String, Map<String, Map<String, Object>>> configsMap = new LinkedHashMap<>();
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboMetadata.java
similarity index 66%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboMetadata.java
index eba7b56..cf08180 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboMetadata.java
@@ -14,34 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.boot.dubbo.util.DubboUtils;
-import com.alibaba.dubbo.common.Version;
-
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+import org.apache.dubbo.common.Version;
+import org.apache.dubbo.spring.boot.util.DubboUtils;
+import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_MAILING_LIST;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_GIT_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_ISSUES_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_MAILING_LIST;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_GIT_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_ISSUES_URL;
/**
- * Actuator {@link Endpoint} to expose Dubbo Meta Data
- *
- *
- * @see Endpoint
- * @since 1.0.0
+ * Dubbo Metadata
+ * @since 2.7.0
*/
-@Endpoint(id = "dubbo")
-public class DubboEndpoint {
+@Component
+public class DubboMetadata {
- @ReadOperation
public Map<String, Object> invoke() {
Map<String, Object> metaData = new LinkedHashMap<>();
@@ -64,5 +58,4 @@
return metaData;
}
-
}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboPropertiesMetadata.java
similarity index 67%
copy from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
copy to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboPropertiesMetadata.java
index f9b9d1a..3749a06 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboPropertiesEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboPropertiesMetadata.java
@@ -14,29 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+import org.springframework.stereotype.Component;
import java.util.SortedMap;
-import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.filterDubboProperties;
/**
- * Dubbo Properties {@link Endpoint}
+ * Dubbo Properties Metadata
*
- *
- * @since 1.0.0
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboproperties")
-public class DubboPropertiesEndpoint extends AbstractDubboEndpoint {
+@Component
+public class DubboPropertiesMetadata extends AbstractDubboMetadata {
- @ReadOperation
public SortedMap<String, Object> properties() {
-
return filterDubboProperties(environment);
-
}
-
-}
+}
\ No newline at end of file
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboReferencesMetadataEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
similarity index 78%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboReferencesMetadataEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
index 3d4bbf6..e389a6a 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboReferencesMetadataEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboReferencesMetadata.java
@@ -14,29 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.dubbo.config.spring.ReferenceBean;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
-
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.config.spring.ReferenceBean;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
import org.springframework.beans.factory.annotation.InjectionMetadata;
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
/**
- * Dubbo {@link Reference} Metadata {@link Endpoint}
+ * Dubbo {@link Reference} Metadata
*
- *
- * @since 1.0.0
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboreferences")
-public class DubboReferencesMetadataEndpoint extends AbstractDubboEndpoint {
+@Component
+public class DubboReferencesMetadata extends AbstractDubboMetadata {
- @ReadOperation
public Map<String, Map<String, Object>> references() {
Map<String, Map<String, Object>> referencesMetadata = new LinkedHashMap<>();
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboServicesMetadataEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
similarity index 81%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboServicesMetadataEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
index 0c4c788..7122e36 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboServicesMetadataEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboServicesMetadata.java
@@ -14,27 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.dubbo.config.annotation.Service;
-import com.alibaba.dubbo.config.spring.ServiceBean;
-
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.config.spring.ServiceBean;
+import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
/**
- * Dubbo {@link Service} Metadata {@link Endpoint}
+ * Dubbo {@link Service} Metadata
*
- *
- * @since 0.2.0
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboservices")
-public class DubboServicesMetadataEndpoint extends AbstractDubboEndpoint {
+@Component
+public class DubboServicesMetadata extends AbstractDubboMetadata {
- @ReadOperation
public Map<String, Map<String, Object>> services() {
Map<String, ServiceBean> serviceBeansMap = getServiceBeansMap();
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboShutdownEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboShutdownMetadata.java
similarity index 76%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboShutdownEndpoint.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboShutdownMetadata.java
index 1014800..225c324 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboShutdownEndpoint.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/DubboShutdownMetadata.java
@@ -14,31 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
+package org.apache.dubbo.spring.boot.actuate.endpoint.metadata;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.spring.ServiceBean;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
-
-import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
-import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
+import org.apache.dubbo.config.spring.ServiceBean;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
+import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;
-import static com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistries;
+import static org.apache.dubbo.registry.support.AbstractRegistryFactory.getRegistries;
/**
* Dubbo Shutdown
*
- * @since 0.2.0
+ * @since 2.7.0
*/
-@Endpoint(id = "dubboshutdown")
-public class DubboShutdownEndpoint extends AbstractDubboEndpoint {
+@Component
+public class DubboShutdownMetadata extends AbstractDubboMetadata {
- @WriteOperation
public Map<String, Object> shutdown() throws Exception {
Map<String, Object> shutdownCountData = new LinkedHashMap<>();
@@ -49,7 +45,6 @@
// protocols
int protocolsCount = getProtocolConfigsBeanMap().size();
- ProtocolConfig.destroyAll();
shutdownCountData.put("registries", registriesCount);
shutdownCountData.put("protocols", protocolsCount);
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/mvc/DubboMvcEndpoint.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/mvc/DubboMvcEndpoint.java
new file mode 100644
index 0000000..fb23504
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/mvc/DubboMvcEndpoint.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.actuate.endpoint.mvc;
+
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboConfigsMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboPropertiesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboReferencesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboServicesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboShutdownMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
+import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.context.request.async.DeferredResult;
+
+import java.util.Map;
+import java.util.SortedMap;
+
+/**
+ * {@link MvcEndpoint} to expose Dubbo Metadata
+ *
+ * @see MvcEndpoint
+ * @since 2.7.0
+ */
+public class DubboMvcEndpoint extends EndpointMvcAdapter {
+
+ public static final String DUBBO_SHUTDOWN_ENDPOINT_URI = "/shutdown";
+
+ public static final String DUBBO_CONFIGS_ENDPOINT_URI = "/configs";
+
+ public static final String DUBBO_SERVICES_ENDPOINT_URI = "/services";
+
+ public static final String DUBBO_REFERENCES_ENDPOINT_URI = "/references";
+
+ public static final String DUBBO_PROPERTIES_ENDPOINT_URI = "/properties";
+
+ private final Logger logger = LoggerFactory.getLogger(getClass());
+
+ @Autowired
+ private DubboShutdownMetadata dubboShutdownMetadata;
+
+ @Autowired
+ private DubboConfigsMetadata dubboConfigsMetadata;
+
+ @Autowired
+ private DubboServicesMetadata dubboServicesMetadata;
+
+ @Autowired
+ private DubboReferencesMetadata dubboReferencesMetadata;
+
+ @Autowired
+ private DubboPropertiesMetadata dubboPropertiesMetadata;
+
+ public DubboMvcEndpoint(DubboEndpoint dubboEndpoint) {
+ super(dubboEndpoint);
+ }
+
+
+ @RequestMapping(value = DUBBO_SHUTDOWN_ENDPOINT_URI, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
+ @ResponseBody
+ public DeferredResult shutdown() throws Exception {
+ Map<String, Object> shutdownCountData = dubboShutdownMetadata.shutdown();
+ return new DeferredResult(null, shutdownCountData);
+ }
+
+ @RequestMapping(value = DUBBO_CONFIGS_ENDPOINT_URI, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ @ResponseBody
+ public Map<String, Map<String, Map<String, Object>>> configs() {
+ return dubboConfigsMetadata.configs();
+ }
+
+
+ @RequestMapping(value = DUBBO_SERVICES_ENDPOINT_URI, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ @ResponseBody
+ public Map<String, Map<String, Object>> services() {
+ return dubboServicesMetadata.services();
+ }
+
+ @RequestMapping(value = DUBBO_REFERENCES_ENDPOINT_URI, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ @ResponseBody
+ public Map<String, Map<String, Object>> references() {
+ return dubboReferencesMetadata.references();
+ }
+
+ @RequestMapping(value = DUBBO_PROPERTIES_ENDPOINT_URI, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ @ResponseBody
+ public SortedMap<String, Object> properties() {
+ return dubboPropertiesMetadata.properties();
+
+ }
+}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicator.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicator.java
similarity index 85%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicator.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicator.java
index e84a24e..c937dc6 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicator.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicator.java
@@ -14,13 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.health;
+package org.apache.dubbo.spring.boot.actuate.health;
-import com.alibaba.dubbo.common.extension.ExtensionLoader;
-import com.alibaba.dubbo.common.status.StatusChecker;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.ProviderConfig;
-
+import org.apache.dubbo.common.extension.ExtensionLoader;
+import org.apache.dubbo.common.status.StatusChecker;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.ProviderConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
@@ -32,15 +31,13 @@
import java.util.Map;
import java.util.Set;
-import static com.alibaba.boot.dubbo.actuate.health.DubboHealthIndicatorProperties.PREFIX;
-import static com.alibaba.dubbo.common.extension.ExtensionLoader.getExtensionLoader;
+import static org.apache.dubbo.common.extension.ExtensionLoader.getExtensionLoader;
/**
* Dubbo {@link HealthIndicator}
*
- *
* @see HealthIndicator
- * @since 1.0.0
+ * @since 2.7.0
*/
public class DubboHealthIndicator extends AbstractHealthIndicator {
@@ -75,16 +72,16 @@
StatusChecker checker = extensionLoader.getExtension(statusCheckerName);
- com.alibaba.dubbo.common.status.Status status = checker.check();
+ org.apache.dubbo.common.status.Status status = checker.check();
- com.alibaba.dubbo.common.status.Status.Level level = status.getLevel();
+ org.apache.dubbo.common.status.Status.Level level = status.getLevel();
- if (!hasError && level.equals(com.alibaba.dubbo.common.status.Status.Level.ERROR)) {
+ if (!hasError && level.equals(org.apache.dubbo.common.status.Status.Level.ERROR)) {
hasError = true;
builder.down();
}
- if (!hasError && !hasUnknown && level.equals(com.alibaba.dubbo.common.status.Status.Level.UNKNOWN)) {
+ if (!hasError && !hasUnknown && level.equals(org.apache.dubbo.common.status.Status.Level.UNKNOWN)) {
hasUnknown = true;
builder.unknown();
}
@@ -129,13 +126,13 @@
for (String statusName : status.getDefaults()) {
- statusCheckerNamesMap.put(statusName, PREFIX + ".status.defaults");
+ statusCheckerNamesMap.put(statusName, DubboHealthIndicatorProperties.PREFIX + ".status.defaults");
}
for (String statusName : status.getExtras()) {
- statusCheckerNamesMap.put(statusName, PREFIX + ".status.extras");
+ statusCheckerNamesMap.put(statusName, DubboHealthIndicatorProperties.PREFIX + ".status.extras");
}
diff --git a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorProperties.java b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorProperties.java
similarity index 79%
rename from dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorProperties.java
rename to dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorProperties.java
index e6db928..7699293 100644
--- a/dubbo-spring-boot-actuator/src/main/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorProperties.java
+++ b/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorProperties.java
@@ -14,10 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.health;
+package org.apache.dubbo.spring.boot.actuate.health;
-import com.alibaba.dubbo.common.status.StatusChecker;
-
+import org.apache.dubbo.common.status.StatusChecker;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -25,14 +24,13 @@
import java.util.LinkedHashSet;
import java.util.Set;
-import static com.alibaba.boot.dubbo.actuate.health.DubboHealthIndicatorProperties.PREFIX;
+import static org.apache.dubbo.spring.boot.actuate.health.DubboHealthIndicatorProperties.PREFIX;
/**
* Dubbo {@link HealthIndicator} Properties
*
- *
* @see HealthIndicator
- * @since 1.0.0
+ * @since 2.7.0
*/
@ConfigurationProperties(prefix = PREFIX, ignoreUnknownFields = false)
public class DubboHealthIndicatorProperties {
@@ -55,13 +53,13 @@
/**
* The nested class for {@link StatusChecker}'s names
* <pre>
- * registry=com.alibaba.dubbo.registry.status.RegistryStatusChecker
- * spring=com.alibaba.dubbo.config.spring.status.SpringStatusChecker
- * datasource=com.alibaba.dubbo.config.spring.status.DataSourceStatusChecker
- * memory=com.alibaba.dubbo.common.status.support.MemoryStatusChecker
- * load=com.alibaba.dubbo.common.status.support.LoadStatusChecker
- * server=com.alibaba.dubbo.rpc.protocol.dubbo.status.ServerStatusChecker
- * threadpool=com.alibaba.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusChecker
+ * registry= org.apache.dubbo.registry.status.RegistryStatusChecker
+ * spring= org.apache.dubbo.config.spring.status.SpringStatusChecker
+ * datasource= org.apache.dubbo.config.spring.status.DataSourceStatusChecker
+ * memory= org.apache.dubbo.common.status.support.MemoryStatusChecker
+ * load= org.apache.dubbo.common.status.support.LoadStatusChecker
+ * server= org.apache.dubbo.rpc.protocol.dubbo.status.ServerStatusChecker
+ * threadpool= org.apache.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusChecker
* </pre>
*
* @see StatusChecker
diff --git a/dubbo-spring-boot-compatible/actuator/src/main/resources/META-INF/spring.factories b/dubbo-spring-boot-compatible/actuator/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..bea4633
--- /dev/null
+++ b/dubbo-spring-boot-compatible/actuator/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,6 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboEndpointAutoConfiguration,\
+org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboHealthIndicatorAutoConfiguration,\
+org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboEndpointMetadataAutoConfiguration
+org.springframework.boot.actuate.autoconfigure.ManagementContextConfiguration=\
+org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboMvcEndpointManagementContextConfiguration
\ No newline at end of file
diff --git a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java b/dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfigurationTest.java
similarity index 74%
copy from dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java
copy to dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfigurationTest.java
index 29e2af6..9f5f51e 100644
--- a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/endpoint/DubboEndpointsAutoConfigurationTest.java
+++ b/dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/autoconfigure/DubboEndpointAutoConfigurationTest.java
@@ -14,13 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.endpoint;
-
-import com.alibaba.boot.dubbo.actuate.autoconfigure.DubboEndpointsAutoConfiguration;
-import com.alibaba.dubbo.config.annotation.Service;
+package org.apache.dubbo.spring.boot.actuate.autoconfigure;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.actuate.endpoint.DubboEndpoint;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboConfigsMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboPropertiesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboReferencesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboServicesMetadata;
+import org.apache.dubbo.spring.boot.actuate.endpoint.metadata.DubboShutdownMetadata;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -36,15 +40,15 @@
import java.util.function.Supplier;
/**
- * {@link DubboEndpointsAutoConfiguration} Test
+ * {@link DubboEndpointAutoConfiguration} Test
*
- * @since 0.2.0
+ * @since 2.7.0
*/
@RunWith(SpringRunner.class)
@SpringBootTest(
classes = {
- DubboEndpointsAutoConfiguration.class,
- DubboEndpointsAutoConfigurationTest.class
+ DubboEndpointAutoConfiguration.class,
+ DubboEndpointAutoConfigurationTest.class
},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
@@ -60,48 +64,51 @@
"dubbo.protocol.port=20880",
"dubbo.provider.id=my-provider",
"dubbo.provider.host=127.0.0.1",
- "dubbo.scan.basePackages=com.alibaba.boot.dubbo.actuate.endpoint",
- "management.endpoint.dubbo.enabled = true",
- "management.endpoint.dubboshutdown.enabled = true",
- "management.endpoint.dubboconfigs.enabled = true",
- "management.endpoint.dubboservices.enabled = true",
- "management.endpoint.dubboreferences.enabled = true",
- "management.endpoint.dubboproperties.enabled = true",
- "management.endpoints.web.exposure.include = *",
+ "dubbo.scan.basePackages=org.apache.dubbo.spring.boot.actuate.autoconfigure",
+ "endpoints.enabled = true",
+ "management.security.enabled = false",
+ "management.contextPath = /actuator",
+ "endpoints.dubbo.enabled = true",
+ "endpoints.dubbo.sensitive = false",
+ "endpoints.dubboshutdown.enabled = true",
+ "endpoints.dubboconfigs.enabled = true",
+ "endpoints.dubboservices.enabled = true",
+ "endpoints.dubboreferences.enabled = true",
+ "endpoints.dubboproperties.enabled = true",
})
@EnableAutoConfiguration
-public class DubboEndpointsAutoConfigurationTest {
+public class DubboEndpointAutoConfigurationTest {
@Autowired
private DubboEndpoint dubboEndpoint;
@Autowired
- private DubboConfigsMetadataEndpoint dubboConfigsMetadataEndpoint;
+ private DubboConfigsMetadata dubboConfigsMetadata;
@Autowired
- private DubboPropertiesEndpoint dubboPropertiesEndpoint;
+ private DubboPropertiesMetadata dubboProperties;
@Autowired
- private DubboReferencesMetadataEndpoint dubboReferencesMetadataEndpoint;
+ private DubboReferencesMetadata dubboReferencesMetadata;
@Autowired
- private DubboServicesMetadataEndpoint dubboServicesMetadataEndpoint;
+ private DubboServicesMetadata dubboServicesMetadata;
@Autowired
- private DubboShutdownEndpoint dubboShutdownEndpoint;
+ private DubboShutdownMetadata dubboShutdownMetadata;
private RestTemplate restTemplate = new RestTemplate();
@Autowired
private ObjectMapper objectMapper;
- @Value("http://127.0.0.1:${local.management.port}${management.endpoints.web.base-path:/actuator}")
+ @Value("http://127.0.0.1:${local.management.port}${management.contextPath:}")
private String actuatorBaseURL;
@Test
public void testShutdown() throws Exception {
- Map<String, Object> value = dubboShutdownEndpoint.shutdown();
+ Map<String, Object> value = dubboShutdownMetadata.shutdown();
Map<String, Object> shutdownCounts = (Map<String, Object>) value.get("shutdown.count");
@@ -115,7 +122,7 @@
@Test
public void testConfigs() {
- Map<String, Map<String, Map<String, Object>>> configsMap = dubboConfigsMetadataEndpoint.configs();
+ Map<String, Map<String, Map<String, Object>>> configsMap = dubboConfigsMetadata.configs();
Map<String, Map<String, Object>> beansMetadata = configsMap.get("ApplicationConfig");
Assert.assertEquals("dubbo-demo-application", beansMetadata.get("my-application").get("name"));
@@ -152,11 +159,11 @@
@Test
public void testServices() {
- Map<String, Map<String, Object>> services = dubboServicesMetadataEndpoint.services();
+ Map<String, Map<String, Object>> services = dubboServicesMetadata.services();
Assert.assertEquals(1, services.size());
- Map<String, Object> demoServiceMeta = services.get("ServiceBean:com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpointsAutoConfigurationTest$DemoService:1.0.0");
+ Map<String, Object> demoServiceMeta = services.get("ServiceBean:org.apache.dubbo.spring.boot.actuate.autoconfigure.DubboEndpointAutoConfigurationTest$DemoService:1.0.0");
Assert.assertEquals("1.0.0", demoServiceMeta.get("version"));
@@ -165,7 +172,7 @@
@Test
public void testReferences() {
- Map<String, Map<String, Object>> references = dubboReferencesMetadataEndpoint.references();
+ Map<String, Map<String, Object>> references = dubboReferencesMetadata.references();
Assert.assertTrue(references.isEmpty());
@@ -174,7 +181,7 @@
@Test
public void testProperties() {
- SortedMap<String, Object> properties = dubboPropertiesEndpoint.properties();
+ SortedMap<String, Object> properties = dubboProperties.properties();
Assert.assertEquals("my-application", properties.get("dubbo.application.id"));
Assert.assertEquals("dubbo-demo-application", properties.get("dubbo.application.name"));
@@ -187,16 +194,16 @@
Assert.assertEquals("20880", properties.get("dubbo.protocol.port"));
Assert.assertEquals("my-provider", properties.get("dubbo.provider.id"));
Assert.assertEquals("127.0.0.1", properties.get("dubbo.provider.host"));
- Assert.assertEquals("com.alibaba.boot.dubbo.actuate.endpoint", properties.get("dubbo.scan.basePackages"));
+ Assert.assertEquals("org.apache.dubbo.spring.boot.actuate.autoconfigure", properties.get("dubbo.scan.basePackages"));
}
@Test
public void testHttpEndpoints() throws JsonProcessingException {
// testHttpEndpoint("/dubbo", dubboEndpoint::invoke);
- testHttpEndpoint("/dubbo/configs", dubboConfigsMetadataEndpoint::configs);
- testHttpEndpoint("/dubbo/services", dubboServicesMetadataEndpoint::services);
- testHttpEndpoint("/dubbo/references", dubboReferencesMetadataEndpoint::references);
- testHttpEndpoint("/dubbo/properties", dubboPropertiesEndpoint::properties);
+ testHttpEndpoint("/dubbo/configs", dubboConfigsMetadata::configs);
+ testHttpEndpoint("/dubbo/services", dubboServicesMetadata::services);
+ testHttpEndpoint("/dubbo/references", dubboReferencesMetadata::references);
+ testHttpEndpoint("/dubbo/properties", dubboProperties::properties);
}
private void testHttpEndpoint(String actuatorURI, Supplier<Map> resultsSupplier) throws JsonProcessingException {
@@ -206,6 +213,10 @@
}
+ interface DemoService {
+ String sayHello(String name);
+ }
+
@Service(
version = "${dubbo.service.version}",
application = "${dubbo.application.id}",
@@ -220,9 +231,5 @@
}
- interface DemoService {
- String sayHello(String name);
- }
-
}
diff --git a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorTest.java b/dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorTest.java
similarity index 91%
rename from dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorTest.java
rename to dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorTest.java
index 41de0a8..a3ac06d 100644
--- a/dubbo-spring-boot-actuator/src/test/java/com/alibaba/boot/dubbo/actuate/health/DubboHealthIndicatorTest.java
+++ b/dubbo-spring-boot-compatible/actuator/src/test/java/org/apache/dubbo/spring/boot/actuate/health/DubboHealthIndicatorTest.java
@@ -14,10 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.actuate.health;
+package org.apache.dubbo.spring.boot.actuate.health;
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubboConfig;
-
+import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -27,18 +26,17 @@
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
import java.util.Map;
/**
* {@link DubboHealthIndicator} Test
*
- *
* @see DubboHealthIndicator
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(properties = {
"dubbo.protocol.id = dubbo-protocol",
"dubbo.protocol.name = dubbo",
diff --git a/dubbo-spring-boot-compatible/autoconfigure/pom.xml b/dubbo-spring-boot-compatible/autoconfigure/pom.xml
new file mode 100644
index 0000000..f1b0e12
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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
+
+ http://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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-compatible</artifactId>
+ <version>${revision}</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
+ <name>Apache Dubbo Spring Boot :: Compatible :: Auto-Configure</name>
+ <description>Apache Dubbo Spring Boot Compatible for Spring Boot 1.x Auto-Configure</description>
+
+
+ <dependencies>
+
+ <!-- Spring Boot dependencies -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-logging</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- @ConfigurationProperties annotation processing (metadata for IDEs) -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-configuration-processor</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- Dubbo -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java
new file mode 100644
index 0000000..f49e49e
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfiguration.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.context.annotation.DubboConfigConfiguration;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.PropertyResolver;
+
+import java.util.Set;
+
+import static java.util.Collections.emptySet;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_CONFIG_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SCAN_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.MULTIPLE_CONFIG_PROPERTY_NAME;
+
+/**
+ * Dubbo Auto {@link Configuration}
+ *
+ * @see Reference
+ * @see Service
+ * @see ServiceAnnotationBeanPostProcessor
+ * @see ReferenceAnnotationBeanPostProcessor
+ * @since 2.7.0
+ */
+@ConditionalOnProperty(prefix = DUBBO_PREFIX, name = "enabled", matchIfMissing = true)
+@Configuration
+@AutoConfigureAfter(DubboRelaxedBindingAutoConfiguration.class)
+public class DubboAutoConfiguration {
+
+ /**
+ * Creates {@link ServiceAnnotationBeanPostProcessor} Bean
+ *
+ * @param propertyResolver {@link PropertyResolver} Bean
+ * @return {@link ServiceAnnotationBeanPostProcessor}
+ */
+ @ConditionalOnProperty(prefix = DUBBO_SCAN_PREFIX, name = BASE_PACKAGES_PROPERTY_NAME)
+ @ConditionalOnBean(name = BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME)
+ @Bean
+ public ServiceAnnotationBeanPostProcessor serviceAnnotationBeanPostProcessor(
+ @Qualifier(BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME) PropertyResolver propertyResolver) {
+ Set<String> packagesToScan = propertyResolver.getProperty(BASE_PACKAGES_PROPERTY_NAME, Set.class, emptySet());
+ return new ServiceAnnotationBeanPostProcessor(packagesToScan);
+ }
+
+ /**
+ * Creates {@link ReferenceAnnotationBeanPostProcessor} Bean if Absent
+ *
+ * @return {@link ReferenceAnnotationBeanPostProcessor}
+ */
+ @ConditionalOnMissingBean
+ @Bean(name = ReferenceAnnotationBeanPostProcessor.BEAN_NAME)
+ public ReferenceAnnotationBeanPostProcessor referenceAnnotationBeanPostProcessor() {
+ return new ReferenceAnnotationBeanPostProcessor();
+ }
+
+ /**
+ * Single Dubbo Config Configuration
+ *
+ * @see EnableDubboConfig
+ * @see DubboConfigConfiguration.Single
+ */
+ @EnableDubboConfig
+ protected static class SingleDubboConfigConfiguration {
+ }
+
+ /**
+ * Multiple Dubbo Config Configuration , equals @EnableDubboConfig.multiple() == <code>true</code>
+ *
+ * @see EnableDubboConfig
+ * @see DubboConfigConfiguration.Multiple
+ */
+ @ConditionalOnProperty(prefix = DUBBO_CONFIG_PREFIX, name = MULTIPLE_CONFIG_PROPERTY_NAME, matchIfMissing = true)
+ @EnableDubboConfig(multiple = true)
+ protected static class MultipleDubboConfigConfiguration {
+ }
+
+}
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBindingAutoConfiguration.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBindingAutoConfiguration.java
new file mode 100644
index 0000000..4de242e
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBindingAutoConfiguration.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.bind.RelaxedPropertyResolver;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+import org.springframework.core.env.Environment;
+import org.springframework.core.env.PropertyResolver;
+
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SCAN_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME;
+import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
+
+/**
+ * Dubbo Relaxed Binding Auto-{@link Configuration} for Spring Boot 1.x
+ */
+@ConditionalOnProperty(prefix = DUBBO_PREFIX, name = "enabled", matchIfMissing = true)
+@ConditionalOnClass(name = "org.springframework.boot.bind.RelaxedPropertyResolver")
+@Configuration
+public class DubboRelaxedBindingAutoConfiguration {
+
+ @Bean(name = BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME)
+ public PropertyResolver dubboScanBasePackagesPropertyResolver(Environment environment) {
+ return new RelaxedPropertyResolver(environment, DUBBO_SCAN_PREFIX);
+ }
+
+ @ConditionalOnMissingBean(name = RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME, value = DubboConfigBinder.class)
+ @Bean(RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME)
+ @Scope(scopeName = SCOPE_PROTOTYPE)
+ public DubboConfigBinder relaxedDubboConfigBinder() {
+ return new RelaxedDubboConfigBinder();
+ }
+}
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinder.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinder.java
new file mode 100644
index 0000000..b0e8480
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinder.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.AbstractConfig;
+import org.apache.dubbo.config.spring.context.properties.AbstractDubboConfigBinder;
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
+import org.springframework.beans.MutablePropertyValues;
+import org.springframework.boot.bind.RelaxedDataBinder;
+
+import java.util.Map;
+
+import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getSubProperties;
+
+/**
+ * Spring Boot Relaxed {@link DubboConfigBinder} implementation
+ *
+ * @since 2.7.0
+ */
+class RelaxedDubboConfigBinder extends AbstractDubboConfigBinder {
+
+ @Override
+ public <C extends AbstractConfig> void bind(String prefix, C dubboConfig) {
+ RelaxedDataBinder relaxedDataBinder = new RelaxedDataBinder(dubboConfig);
+ // Set ignored*
+ relaxedDataBinder.setIgnoreInvalidFields(isIgnoreInvalidFields());
+ relaxedDataBinder.setIgnoreUnknownFields(isIgnoreUnknownFields());
+ // Get properties under specified prefix from PropertySources
+ Map<String, Object> properties = getSubProperties(getPropertySources(), prefix);
+ // Convert Map to MutablePropertyValues
+ MutablePropertyValues propertyValues = new MutablePropertyValues(properties);
+ // Bind
+ relaxedDataBinder.bind(propertyValues);
+ }
+}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListener.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListener.java
similarity index 79%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListener.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListener.java
index b8a2234..738c2b1 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListener.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListener.java
@@ -14,17 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
-import org.springframework.boot.WebApplicationType;
import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.SmartApplicationListener;
+import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import java.util.concurrent.ExecutorService;
@@ -37,10 +38,15 @@
/**
* Awaiting Non-Web Spring Boot {@link ApplicationListener}
*
- * @since 0.1.1
+ * @since 2.7.0
*/
public class AwaitingNonWebApplicationListener implements SmartApplicationListener {
+ private static final String[] WEB_APPLICATION_CONTEXT_CLASSES = new String[]{
+ "org.springframework.web.context.WebApplicationContext",
+ "org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext"
+ };
+
private static final Logger logger = LoggerFactory.getLogger(AwaitingNonWebApplicationListener.class);
private static final Class<? extends ApplicationEvent>[] SUPPORTED_APPLICATION_EVENTS =
@@ -54,6 +60,14 @@
private final ExecutorService executorService = Executors.newSingleThreadExecutor();
+ private static <T> T[] of(T... values) {
+ return values;
+ }
+
+ static AtomicBoolean getAwaited() {
+ return awaited;
+ }
+
@Override
public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) {
return ObjectUtils.containsElement(SUPPORTED_APPLICATION_EVENTS, eventType);
@@ -64,10 +78,6 @@
return true;
}
- private static <T> T[] of(T... values) {
- return values;
- }
-
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ApplicationReadyEvent) {
@@ -86,12 +96,30 @@
final SpringApplication springApplication = event.getSpringApplication();
- if (!WebApplicationType.NONE.equals(springApplication.getWebApplicationType())) {
+ if (isWebApplication(event.getApplicationContext(), springApplication.getClassLoader())) {
return;
}
await();
+ }
+ private static boolean isWebApplication(ApplicationContext applicationContext, ClassLoader classLoader) {
+ boolean webApplication = false;
+ for (String contextClass : WEB_APPLICATION_CONTEXT_CLASSES) {
+ if (isAssignable(contextClass, applicationContext.getClass(), classLoader)) {
+ webApplication = true;
+ break;
+ }
+ }
+ return webApplication;
+ }
+
+ private static boolean isAssignable(String target, Class<?> type, ClassLoader classLoader) {
+ try {
+ return ClassUtils.resolveClassName(target, classLoader).isAssignableFrom(type);
+ } catch (Throwable ex) {
+ return false;
+ }
}
protected void onContextClosedEvent(ContextClosedEvent event) {
@@ -146,8 +174,4 @@
lock.unlock();
}
}
-
- static AtomicBoolean getAwaited() {
- return awaited;
- }
}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListener.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListener.java
similarity index 82%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListener.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListener.java
index e2a2363..6e6826b 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListener.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListener.java
@@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
-import com.alibaba.dubbo.common.utils.ConfigUtils;
-import com.alibaba.dubbo.config.AbstractConfig;
-
+import org.apache.dubbo.common.utils.ConfigUtils;
+import org.apache.dubbo.config.AbstractConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
@@ -29,9 +28,9 @@
import java.util.SortedMap;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE;
-import static com.alibaba.boot.dubbo.util.DubboUtils.OVERRIDE_CONFIG_PROPERTY_NAME;
-import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.OVERRIDE_CONFIG_FULL_PROPERTY_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.filterDubboProperties;
/**
* {@link ApplicationListener} to override the dubbo properties from {@link Environment}into
@@ -40,7 +39,7 @@
* <p>
*
* @see ConfigUtils
- * @since 1.0.0
+ * @since 2.7.0
*/
@Order // LOWEST_PRECEDENCE Make sure last execution
public class OverrideDubboConfigApplicationListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> {
@@ -56,7 +55,7 @@
ConfigurableEnvironment environment = event.getEnvironment();
- boolean override = environment.getProperty(OVERRIDE_CONFIG_PROPERTY_NAME, boolean.class,
+ boolean override = environment.getProperty(OVERRIDE_CONFIG_FULL_PROPERTY_NAME, boolean.class,
DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE);
if (override) {
@@ -66,19 +65,12 @@
ConfigUtils.getProperties().putAll(dubboProperties);
if (logger.isInfoEnabled()) {
-
logger.info("Dubbo Config was overridden by externalized configuration {}", dubboProperties);
-
}
-
} else {
-
if (logger.isInfoEnabled()) {
-
- logger.info("Disable override Dubbo Config caused by property {} = {}", OVERRIDE_CONFIG_PROPERTY_NAME, override);
-
+ logger.info("Disable override Dubbo Config caused by property {} = {}", OVERRIDE_CONFIG_FULL_PROPERTY_NAME, override);
}
-
}
}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListener.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListener.java
similarity index 83%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListener.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListener.java
index 9802a3b..f053227 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListener.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListener.java
@@ -14,31 +14,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
-import com.alibaba.dubbo.common.Version;
-
+import org.apache.dubbo.common.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
-import org.springframework.boot.context.logging.LoggingApplicationListener;
import org.springframework.context.ApplicationListener;
+import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import java.util.concurrent.atomic.AtomicBoolean;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_MAILING_LIST;
-import static com.alibaba.boot.dubbo.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
-import static com.alibaba.boot.dubbo.util.DubboUtils.LINE_SEPARATOR;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_MAILING_LIST;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.LINE_SEPARATOR;
/**
* Dubbo Welcome Logo {@link ApplicationListener}
*
* @see ApplicationListener
- * @since 1.0.0
+ * @since 2.7.0
*/
-@Order(LoggingApplicationListener.DEFAULT_ORDER + 1)
+@Order(Ordered.HIGHEST_PRECEDENCE + 20 + 1) // After LoggingApplicationListener#DEFAULT_ORDER
public class WelcomeLogoApplicationListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> {
private static AtomicBoolean processed = new AtomicBoolean(false);
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessor.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
similarity index 95%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
index 3292bf9..0efbc6b 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
@@ -14,12 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.env;
+package org.apache.dubbo.spring.boot.env;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubboConfig;
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubboConfigBinding;
-
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfigBinding;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.ContextIdApplicationContextInitializer;
import org.springframework.boot.env.EnvironmentPostProcessor;
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/DubboUtils.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/DubboUtils.java
similarity index 77%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/DubboUtils.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/DubboUtils.java
index 59cde99..5b9fcd4 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/DubboUtils.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/DubboUtils.java
@@ -14,9 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.util;
+package org.apache.dubbo.spring.boot.util;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.PropertyResolver;
import java.util.Collections;
import java.util.Map;
@@ -26,7 +29,7 @@
/**
* The utilities class for Dubbo
*
- * @since 1.0.0
+ * @since 2.7.0
*/
public abstract class DubboUtils {
@@ -49,38 +52,38 @@
/**
* The prefix of property name for Dubbo scan
*/
- public static final String DUBBO_SCAN_PREFIX = DUBBO_PREFIX + PROPERTY_NAME_SEPARATOR + "scan";
+ public static final String DUBBO_SCAN_PREFIX = DUBBO_PREFIX + PROPERTY_NAME_SEPARATOR + "scan" + PROPERTY_NAME_SEPARATOR;
/**
- * The prefix of property name for Dubbo Config.ØØ
+ * The prefix of property name for Dubbo Config
*/
- public static final String DUBBO_CONFIG_PREFIX = DUBBO_PREFIX + PROPERTY_NAME_SEPARATOR + "config";
+ public static final String DUBBO_CONFIG_PREFIX = DUBBO_PREFIX + PROPERTY_NAME_SEPARATOR + "config" + PROPERTY_NAME_SEPARATOR;
/**
* The property name of base packages to scan
* <p>
* The default value is empty set.
*/
- public static final String BASE_PACKAGES_PROPERTY_NAME = DUBBO_SCAN_PREFIX + PROPERTY_NAME_SEPARATOR + "base-packages";
+ public static final String BASE_PACKAGES_PROPERTY_NAME = "base-packages";
/**
* The property name of multiple properties binding from externalized configuration
* <p>
* The default value is {@link #DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE}
*/
- public static final String MULTIPLE_CONFIG_PROPERTY_NAME = DUBBO_CONFIG_PREFIX + PROPERTY_NAME_SEPARATOR + "multiple";
+ public static final String MULTIPLE_CONFIG_PROPERTY_NAME = "multiple";
/**
* The default value of multiple properties binding from externalized configuration
*/
- public static final boolean DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE = false;
+ public static final boolean DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE = true;
/**
* The property name of override Dubbo config
* <p>
* The default value is {@link #DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE}
*/
- public static final String OVERRIDE_CONFIG_PROPERTY_NAME = DUBBO_CONFIG_PREFIX + PROPERTY_NAME_SEPARATOR + "override";
+ public static final String OVERRIDE_CONFIG_FULL_PROPERTY_NAME = DUBBO_CONFIG_PREFIX + "override";
/**
* The default property value of override Dubbo config
@@ -114,6 +117,16 @@
public static final String DUBBO_MAILING_LIST = "dev@dubbo.apache.org";
/**
+ * The bean name of Relaxed-binding {@link DubboConfigBinder}
+ */
+ public static final String RELAXED_DUBBO_CONFIG_BINDER_BEAN_NAME = "relaxedDubboConfigBinder";
+
+ /**
+ * The bean name of {@link PropertyResolver} for {@link ServiceAnnotationBeanPostProcessor}'s base-packages
+ */
+ public static final String BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME = "dubboScanBasePackagesPropertyResolver";
+
+ /**
* Filters Dubbo Properties from {@link ConfigurableEnvironment}
*
* @param environment {@link ConfigurableEnvironment}
diff --git a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/EnvironmentUtils.java b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/EnvironmentUtils.java
similarity index 98%
rename from dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/EnvironmentUtils.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/EnvironmentUtils.java
index 9b20c58..943c1a4 100644
--- a/dubbo-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/dubbo/util/EnvironmentUtils.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/util/EnvironmentUtils.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.util;
+package org.apache.dubbo.spring.boot.util;
import org.springframework.core.env.CompositePropertySource;
import org.springframework.core.env.ConfigurableEnvironment;
@@ -32,7 +32,7 @@
* The utilities class for {@link Environment}
*
* @see Environment
- * @since 1.0.0
+ * @since 2.7.0
*/
public abstract class EnvironmentUtils {
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json b/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json
new file mode 100644
index 0000000..d810121
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring-configuration-metadata.json
@@ -0,0 +1,1098 @@
+{
+ "hints": [],
+ "groups": [],
+ "properties": [
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.architecture",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.compiler",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.dump-directory",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.environment",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.logger",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.monitor",
+ "type": "org.apache.dubbo.config.MonitorConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.name",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.organization",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.owner",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.qos-accept-foreign-ip",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.qos-enable",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.qos-port",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.registries",
+ "type": "java.util.List<org.apache.dubbo.config.RegistryConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.registry",
+ "type": "org.apache.dubbo.config.RegistryConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ApplicationConfig",
+ "name": "dubbo.application.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.applications",
+ "description": "Multiple {@link ApplicationConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.ApplicationConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.DubboConfigProperties",
+ "name": "dubbo.config.multiple",
+ "description": "Indicates multiple properties binding from externalized configuration or not.",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.DubboConfigProperties",
+ "name": "dubbo.config.override",
+ "description": "Indicates override {@link ConfigUtils#getProperties() Dubbo config properties} from externalized configuration\n or not.",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.actives",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.application",
+ "type": "org.apache.dubbo.config.ApplicationConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.async",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.cache",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.callbacks",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.check",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.client",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.cluster",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.connections",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.filter",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.generic",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.group",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.init",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "deprecated": true,
+ "name": "dubbo.consumer.injvm",
+ "type": "java.lang.Boolean",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.layer",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.lazy",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.listener",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.loadbalance",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "deprecated": true,
+ "name": "dubbo.consumer.local",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.merger",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.mock",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.module",
+ "type": "org.apache.dubbo.config.ModuleConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.monitor",
+ "type": "org.apache.dubbo.config.MonitorConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.onconnect",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.ondisconnect",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.owner",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.proxy",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.reconnect",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.registries",
+ "type": "java.util.List<org.apache.dubbo.config.RegistryConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.registry",
+ "type": "org.apache.dubbo.config.RegistryConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.retries",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.scope",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.sent",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.sticky",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.stub",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.timeout",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.validation",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ConsumerConfig",
+ "name": "dubbo.consumer.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.consumers",
+ "description": "Multiple {@link ConsumerConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.ConsumerConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.monitor",
+ "type": "org.apache.dubbo.config.MonitorConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.name",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.organization",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.owner",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.registries",
+ "type": "java.util.List<org.apache.dubbo.config.RegistryConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.registry",
+ "type": "org.apache.dubbo.config.RegistryConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ModuleConfig",
+ "name": "dubbo.module.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.modules",
+ "description": "Multiple {@link ModuleConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.ModuleConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.address",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.group",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.password",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.protocol",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.username",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.MonitorConfig",
+ "name": "dubbo.monitor.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.monitors",
+ "description": "Multiple {@link MonitorConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.MonitorConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.accepts",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.accesslog",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.buffer",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.charset",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.client",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.codec",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.contextpath",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.dispatcher",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "deprecated": true,
+ "name": "dubbo.protocol.dispather",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.exchanger",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.heartbeat",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.host",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.iothreads",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.name",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.networker",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "deprecated": true,
+ "name": "dubbo.protocol.path",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.payload",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.port",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.prompt",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.queues",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.register",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.serialization",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.server",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.status",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.telnet",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.threadpool",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.threads",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProtocolConfig",
+ "name": "dubbo.protocol.transporter",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.protocols",
+ "description": "Multiple {@link ProtocolConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.ProtocolConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.accepts",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.accesslog",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.actives",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.application",
+ "type": "org.apache.dubbo.config.ApplicationConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.async",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.buffer",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.cache",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.callbacks",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.charset",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.client",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.cluster",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.codec",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.connections",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.contextpath",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "deprecated": true,
+ "name": "dubbo.provider.default",
+ "type": "java.lang.Boolean",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.delay",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.deprecated",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.dispatcher",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "deprecated": true,
+ "name": "dubbo.provider.dispather",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.document",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.dynamic",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.exchanger",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.executes",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.export",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.filter",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.group",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.host",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.iothreads",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.layer",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.listener",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.loadbalance",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "deprecated": true,
+ "name": "dubbo.provider.local",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.merger",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.mock",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.module",
+ "type": "org.apache.dubbo.config.ModuleConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.monitor",
+ "type": "org.apache.dubbo.config.MonitorConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.networker",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.onconnect",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.ondisconnect",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.owner",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "deprecated": true,
+ "name": "dubbo.provider.path",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.payload",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "deprecated": true,
+ "name": "dubbo.provider.port",
+ "type": "java.lang.Integer",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.prompt",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.protocol",
+ "type": "org.apache.dubbo.config.ProtocolConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.protocols",
+ "type": "java.util.List<org.apache.dubbo.config.ProtocolConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.proxy",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.queues",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.register",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.registries",
+ "type": "java.util.List<org.apache.dubbo.config.RegistryConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.registry",
+ "type": "org.apache.dubbo.config.RegistryConfig"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.retries",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.scope",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.sent",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.serialization",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.server",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.status",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.stub",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.telnet",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.threadpool",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.threads",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.timeout",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.token",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.transporter",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.validation",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.wait",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.warmup",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.ProviderConfig",
+ "name": "dubbo.provider.weight",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.providers",
+ "description": "Multiple {@link ProviderConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.ProviderConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.MultipleDubboConfigBindingProperties",
+ "name": "dubbo.registries",
+ "description": "Multiple {@link RegistryConfig} property",
+ "type": "java.util.Map<java.lang.String,org.apache.dubbo.config.RegistryConfig>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.address",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.check",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.client",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.cluster",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.default",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.dynamic",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.file",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.group",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.id",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.parameters",
+ "type": "java.util.Map<java.lang.String,java.lang.String>"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.password",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.port",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.protocol",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.register",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.server",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.session",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.subscribe",
+ "type": "java.lang.Boolean"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.timeout",
+ "type": "java.lang.Integer"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "deprecated": true,
+ "name": "dubbo.registry.transport",
+ "type": "java.lang.String",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.transporter",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.username",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "name": "dubbo.registry.version",
+ "type": "java.lang.String"
+ },
+ {
+ "sourceType": "org.apache.dubbo.config.RegistryConfig",
+ "deprecated": true,
+ "name": "dubbo.registry.wait",
+ "type": "java.lang.Integer",
+ "deprecation": {}
+ },
+ {
+ "sourceType": "org.apache.dubbo.spring.boot.autoconfigure.DubboScanProperties",
+ "name": "dubbo.scan.base-packages",
+ "description": "The base-packages to scan , the multiple-value is delimited by comma\n\n @see EnableDubbo#scanBasePackages()",
+ "type": "java.util.Set<java.lang.String>"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring.factories b/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..08db894
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,9 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration,\
+org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBindingAutoConfiguration
+org.springframework.context.ApplicationListener=\
+org.apache.dubbo.spring.boot.context.event.OverrideDubboConfigApplicationListener,\
+org.apache.dubbo.spring.boot.context.event.WelcomeLogoApplicationListener,\
+org.apache.dubbo.spring.boot.context.event.AwaitingNonWebApplicationListener
+org.springframework.boot.env.EnvironmentPostProcessor=\
+org.apache.dubbo.spring.boot.env.DubboDefaultPropertiesEnvironmentPostProcessor
\ No newline at end of file
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java
new file mode 100644
index 0000000..cd574e0
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * {@link DubboAutoConfiguration} Test
+ *
+ * @see DubboAutoConfiguration
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {
+ CompatibleDubboAutoConfigurationTest.class
+}, properties = {
+ "dubbo.scan.base-packages = org.apache.dubbo.spring.boot.autoconfigure"
+})
+@EnableAutoConfiguration
+public class CompatibleDubboAutoConfigurationTest {
+
+ @Autowired
+ private ObjectProvider<ServiceAnnotationBeanPostProcessor> serviceAnnotationBeanPostProcessor;
+
+ @Autowired
+ private ObjectProvider<ReferenceAnnotationBeanPostProcessor> referenceAnnotationBeanPostProcessor;
+
+ @Test
+ public void testBeans() {
+ Assert.assertNotNull(serviceAnnotationBeanPostProcessor);
+ Assert.assertNotNull(serviceAnnotationBeanPostProcessor.getIfAvailable());
+ Assert.assertNotNull(referenceAnnotationBeanPostProcessor);
+ Assert.assertNotNull(referenceAnnotationBeanPostProcessor.getIfAvailable());
+ }
+}
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTestWithoutProperties.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTestWithoutProperties.java
new file mode 100644
index 0000000..06a21d8
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTestWithoutProperties.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.autoconfigure;
+
+import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
+import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * {@link DubboAutoConfiguration} Test
+ *
+ * @see DubboAutoConfiguration
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = CompatibleDubboAutoConfigurationTestWithoutProperties.class)
+@EnableAutoConfiguration
+public class CompatibleDubboAutoConfigurationTestWithoutProperties {
+
+ @Autowired(required = false)
+ private ServiceAnnotationBeanPostProcessor serviceAnnotationBeanPostProcessor;
+
+ @Autowired
+ private ReferenceAnnotationBeanPostProcessor referenceAnnotationBeanPostProcessor;
+
+ @Test
+ public void testBeans() {
+ Assert.assertNull(serviceAnnotationBeanPostProcessor);
+ Assert.assertNotNull(referenceAnnotationBeanPostProcessor);
+ }
+}
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
similarity index 90%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
index 4163ac0..1addb5e 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
@@ -14,26 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.autoconfigure;
+package org.apache.dubbo.spring.boot.autoconfigure;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ConsumerConfig;
-import com.alibaba.dubbo.config.ModuleConfig;
-import com.alibaba.dubbo.config.MonitorConfig;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.ProviderConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ConsumerConfig;
+import org.apache.dubbo.config.ModuleConfig;
+import org.apache.dubbo.config.MonitorConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.ProviderConfig;
+import org.apache.dubbo.config.RegistryConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -43,10 +43,9 @@
/**
* {@link DubboAutoConfiguration} Test On multiple Dubbo Configuration
*
- *
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(
properties = {
"dubbo.applications.application1.NAME = dubbo-demo-application",
@@ -59,12 +58,15 @@
"dubbo.providers.provider1.host=127.0.0.1",
"dubbo.consumers.consumer1.client=netty",
"dubbo.config.multiple=true",
- "dubbo.scan.basePackages=com.alibaba.boot.dubbo, com.alibaba.boot.dubbo.condition"
+ "dubbo.scan.basePackages=org.apache.dubbo.spring.boot.dubbo, org.apache.dubbo.spring.boot.condition"
}
)
@SpringBootTest(
- classes = {DubboAutoConfiguration.class}
+ classes = {
+ DubboAutoConfigurationOnMultipleConfigTest.class
+ }
)
+@EnableAutoConfiguration
public class DubboAutoConfigurationOnMultipleConfigTest {
@Autowired
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
similarity index 80%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
index 7f4cd5e..28d1e6d 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
@@ -14,34 +14,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.autoconfigure;
+package org.apache.dubbo.spring.boot.autoconfigure;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ConsumerConfig;
-import com.alibaba.dubbo.config.ModuleConfig;
-import com.alibaba.dubbo.config.MonitorConfig;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.ProviderConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
-import com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor;
-
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ConsumerConfig;
+import org.apache.dubbo.config.ModuleConfig;
+import org.apache.dubbo.config.MonitorConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.ProviderConfig;
+import org.apache.dubbo.config.RegistryConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
/**
* {@link DubboAutoConfiguration} Test On single Dubbo Configuration
*
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(
properties = {
"dubbo.application.name = dubbo-demo-application",
@@ -55,8 +53,9 @@
}
)
@SpringBootTest(
- classes = {DubboAutoConfiguration.class}
+ classes = {DubboAutoConfigurationOnSingleConfigTest.class}
)
+@EnableAutoConfiguration
public class DubboAutoConfigurationOnSingleConfigTest {
@Autowired
@@ -92,12 +91,6 @@
@Autowired
private ApplicationContext applicationContext;
- @Autowired(required = false)
- private ServiceAnnotationBeanPostProcessor serviceAnnotationBeanPostProcessor;
-
- @Autowired
- private ReferenceAnnotationBeanPostProcessor referenceAnnotationBeanPostProcessor;
-
@Test
public void testApplicationConfig() {
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinderTest.java
similarity index 74%
copy from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java
copy to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinderTest.java
index 0a151ba..817f035 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/RelaxedDubboConfigBinderTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/RelaxedDubboConfigBinderTest.java
@@ -14,33 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.autoconfigure;
+package org.apache.dubbo.spring.boot.autoconfigure;
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.ProtocolConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.spring.context.properties.DubboConfigBinder;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
/**
* {@link RelaxedDubboConfigBinder} Test
- *
- *
- * @since 0.1.1
*/
-@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = "classpath:/dubbo.properties")
+@RunWith(SpringRunner.class)
+@TestPropertySource(properties = {
+ "dubbo.application.NAME=hello",
+ "dubbo.application.owneR=world",
+ "dubbo.registry.Address=10.20.153.17",
+ "dubbo.protocol.pORt=20881",
+ "dubbo.service.invoke.timeout=2000",
+})
@ContextConfiguration(classes = RelaxedDubboConfigBinder.class)
public class RelaxedDubboConfigBinderTest {
@Autowired
- private RelaxedDubboConfigBinder dubboConfigBinder;
+ private DubboConfigBinder dubboConfigBinder;
@Test
public void testBinder() {
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
similarity index 90%
copy from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java
copy to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
index 42710cd..8de2cae 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/AwaitingNonWebApplicationListenerTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/AwaitingNonWebApplicationListenerTest.java
@@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
import org.junit.Assert;
import org.junit.Test;
-import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -38,7 +37,7 @@
@Test
public void testSingleContextNonWebApplication() {
new SpringApplicationBuilder(Object.class)
- .web(WebApplicationType.NONE)
+ .web(false)
.run().close();
AtomicBoolean awaited = AwaitingNonWebApplicationListener.getAwaited();
Assert.assertTrue(awaited.get());
@@ -48,7 +47,7 @@
public void testMultipleContextNonWebApplication() {
new SpringApplicationBuilder(Object.class)
.parent(Object.class)
- .web(WebApplicationType.NONE)
+ .web(false)
.run().close();
AtomicBoolean awaited = AwaitingNonWebApplicationListener.getAwaited();
Assert.assertTrue(awaited.get());
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
similarity index 89%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
index c69e5f5..4bea84c 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
@@ -14,28 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
-import com.alibaba.dubbo.common.utils.ConfigUtils;
-
+import org.apache.dubbo.common.utils.ConfigUtils;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
import java.util.Properties;
/**
* {@link OverrideDubboConfigApplicationListener} Test
*
- *
* @see OverrideDubboConfigApplicationListener
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(
properties = {
"dubbo.config.override = false",
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
similarity index 77%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
index 2fd7cd1..5e42561 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
@@ -14,28 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
-import com.alibaba.dubbo.common.utils.ConfigUtils;
-
+import org.apache.dubbo.common.utils.ConfigUtils;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
import java.util.Properties;
/**
* {@link OverrideDubboConfigApplicationListener} Test
*
- *
* @see OverrideDubboConfigApplicationListener
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@TestPropertySource(
properties = {
"dubbo.application.name = dubbo-demo-application",
@@ -58,9 +56,9 @@
Properties properties = ConfigUtils.getProperties();
- Assert.assertEquals("dubbo-demo-application",properties.get("dubbo.application.name"));
- Assert.assertEquals("dubbo-demo-module",properties.get("dubbo.module.name"));
- Assert.assertEquals("zookeeper://192.168.99.100:32770",properties.get("dubbo.registry.address"));
+ Assert.assertEquals("dubbo-demo-application", properties.get("dubbo.application.name"));
+ Assert.assertEquals("dubbo-demo-module", properties.get("dubbo.module.name"));
+ Assert.assertEquals("zookeeper://192.168.99.100:32770", properties.get("dubbo.registry.address"));
}
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListenerTest.java
similarity index 88%
rename from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListenerTest.java
index 34bb971..c006a75 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/WelcomeLogoApplicationListenerTest.java
@@ -14,23 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.context.event;
+package org.apache.dubbo.spring.boot.context.event;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
/**
* {@link WelcomeLogoApplicationListener} Test
*
- *
* @see WelcomeLogoApplicationListener
- * @since 1.0.0
+ * @since 2.7.0
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@SpringBootTest(
classes = {WelcomeLogoApplicationListener.class}
)
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
similarity index 98%
copy from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
copy to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
index d941a4f..2fbb6aa 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.env;
+package org.apache.dubbo.spring.boot.env;
import org.junit.Assert;
import org.junit.Test;
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/DubboUtilsTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/DubboUtilsTest.java
new file mode 100644
index 0000000..7242b58
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/DubboUtilsTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.dubbo.spring.boot.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.mock.env.MockEnvironment;
+
+import java.util.SortedMap;
+
+import static org.apache.dubbo.spring.boot.util.DubboUtils.BASE_PACKAGES_PROPERTY_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_CONFIG_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_MAILING_LIST;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SCAN_PREFIX;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_GITHUB_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_GIT_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_SPRING_BOOT_ISSUES_URL;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.MULTIPLE_CONFIG_PROPERTY_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.OVERRIDE_CONFIG_FULL_PROPERTY_NAME;
+import static org.apache.dubbo.spring.boot.util.DubboUtils.filterDubboProperties;
+
+/**
+ * {@link DubboUtils} Test
+ *
+ * @see DubboUtils
+ * @since 2.7.0
+ */
+public class DubboUtilsTest {
+
+ @Test
+ public void testConstants() {
+
+ Assert.assertEquals("dubbo", DUBBO_PREFIX);
+
+ Assert.assertEquals("dubbo.scan.", DUBBO_SCAN_PREFIX);
+
+ Assert.assertEquals("base-packages", BASE_PACKAGES_PROPERTY_NAME);
+
+ Assert.assertEquals("dubbo.config.", DUBBO_CONFIG_PREFIX);
+
+ Assert.assertEquals("multiple", MULTIPLE_CONFIG_PROPERTY_NAME);
+
+ Assert.assertEquals("dubbo.config.override", OVERRIDE_CONFIG_FULL_PROPERTY_NAME);
+
+ Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project", DUBBO_SPRING_BOOT_GITHUB_URL);
+ Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project.git", DUBBO_SPRING_BOOT_GIT_URL);
+ Assert.assertEquals("https://github.com/apache/incubator-dubbo-spring-boot-project/issues", DUBBO_SPRING_BOOT_ISSUES_URL);
+
+ Assert.assertEquals("https://github.com/apache/incubator-dubbo", DUBBO_GITHUB_URL);
+
+ Assert.assertEquals("dev@dubbo.apache.org", DUBBO_MAILING_LIST);
+
+ Assert.assertTrue(DEFAULT_MULTIPLE_CONFIG_PROPERTY_VALUE);
+
+ Assert.assertTrue(DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE);
+
+ }
+
+
+ @Test
+ public void testFilterDubboProperties() {
+
+ MockEnvironment environment = new MockEnvironment();
+ environment.setProperty("message", "Hello,World");
+ environment.setProperty(DUBBO_CONFIG_PREFIX + MULTIPLE_CONFIG_PROPERTY_NAME, "true");
+ environment.setProperty(OVERRIDE_CONFIG_FULL_PROPERTY_NAME, "true");
+
+ SortedMap<String, Object> dubboProperties = filterDubboProperties(environment);
+
+ Assert.assertEquals("true", dubboProperties.get(DUBBO_CONFIG_PREFIX + MULTIPLE_CONFIG_PROPERTY_NAME));
+ Assert.assertEquals("true", dubboProperties.get(OVERRIDE_CONFIG_FULL_PROPERTY_NAME));
+
+ }
+
+}
diff --git a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
similarity index 96%
copy from dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java
copy to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
index 9155471..2ca3766 100644
--- a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/util/EnvironmentUtilsTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/util/EnvironmentUtilsTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.util;
+package org.apache.dubbo.spring.boot.util;
import org.junit.Assert;
import org.junit.Test;
@@ -29,9 +29,8 @@
/**
* {@link EnvironmentUtils} Test
*
- *
* @see EnvironmentUtils
- * @since 1.0.0
+ * @since 2.7.0
*/
public class EnvironmentUtilsTest {
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/pom.xml b/dubbo-spring-boot-compatible/pom.xml
similarity index 60%
rename from dubbo-spring-boot-samples/dubbo-registry-nacos-samples/pom.xml
rename to dubbo-spring-boot-compatible/pom.xml
index 32e2816..8af787e 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/pom.xml
+++ b/dubbo-spring-boot-compatible/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -14,25 +15,29 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
- <artifactId>dubbo-spring-boot-samples</artifactId>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-parent</artifactId>
<version>${revision}</version>
- <relativePath>../pom.xml</relativePath>
+ <relativePath>../dubbo-spring-boot-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>dubbo-spring-boot-registry-nacos-samples</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Nacos</name>
- <description>Dubbo Spring Boot Registry Nacos Samples</description>
+ <artifactId>dubbo-spring-boot-compatible</artifactId>
<packaging>pom</packaging>
+ <name>Apache Dubbo Spring Boot :: Compatible</name>
+ <description>Apache Dubbo Spring Boot Compatible for Spring Boot 1.x</description>
+
+ <properties>
+ <spring-boot.version>1.5.19.RELEASE</spring-boot.version>
+ </properties>
<modules>
- <module>consumer-sample</module>
- <module>provider-sample</module>
+ <module>autoconfigure</module>
+ <module>actuator</module>
</modules>
</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-distribution/assembly/bin-release.xml b/dubbo-spring-boot-distribution/assembly/bin-release.xml
index 1a94381..e055929 100644
--- a/dubbo-spring-boot-distribution/assembly/bin-release.xml
+++ b/dubbo-spring-boot-distribution/assembly/bin-release.xml
@@ -40,7 +40,7 @@
<outputDirectory>/libs</outputDirectory>
<scope>runtime</scope>
<includes>
- <include>com.alibaba.boot:*</include>
+ <include>org.apache.dubbo:*</include>
</includes>
<excludes>
<exclude>com.alibaba:fastjson</exclude>
diff --git a/dubbo-spring-boot-distribution/pom.xml b/dubbo-spring-boot-distribution/pom.xml
index 9f7e21f..181ba44 100644
--- a/dubbo-spring-boot-distribution/pom.xml
+++ b/dubbo-spring-boot-distribution/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -13,12 +14,12 @@
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.
--->
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-parent</artifactId>
<version>${revision}</version>
<relativePath>../dubbo-spring-boot-parent/pom.xml</relativePath>
@@ -27,26 +28,26 @@
<artifactId>dubbo-spring-boot-distribution</artifactId>
<packaging>pom</packaging>
- <name>Dubbo Spring Boot Distribution</name>
- <description>Dubbo Spring Boot Distribution</description>
+ <name>Apache Dubbo Spring Boot :: Distribution</name>
+ <description>Apache Dubbo Spring Boot Distribution</description>
<dependencies>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/dubbo-spring-boot-parent/pom.xml b/dubbo-spring-boot-parent/pom.xml
index c583e0f..9d7b1e8 100644
--- a/dubbo-spring-boot-parent/pom.xml
+++ b/dubbo-spring-boot-parent/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-project</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -28,8 +29,8 @@
<artifactId>dubbo-spring-boot-parent</artifactId>
<packaging>pom</packaging>
- <name>Dubbo Spring Boot Parent</name>
- <description>Dubbo Spring Boot Parent</description>
+ <name>Apache Dubbo Spring Boot :: Parent</name>
+ <description>Apache Dubbo Spring Boot Parent</description>
<properties>
<java.version>1.8</java.version>
@@ -37,10 +38,8 @@
<java.target.version>1.8</java.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <spring-boot.version>2.1.1.RELEASE</spring-boot.version>
- <dubbo.version>2.6.5</dubbo.version>
- <dubbo-registry-nacos.version>0.0.2</dubbo-registry-nacos.version>
- <nacos-client.version>0.6.2</nacos-client.version>
+ <spring-boot.version>2.1.2.RELEASE</spring-boot.version>
+ <dubbo.version>2.7.0</dubbo.version>
<!-- Build args -->
<argline>-server -Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m -Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
@@ -56,7 +55,6 @@
<apache-rat-plugin.version>0.12</apache-rat-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
- <alibaba-spring-context-support.version>1.0.2</alibaba-spring-context-support.version>
</properties>
<dependencyManagement>
@@ -70,18 +68,17 @@
<scope>import</scope>
</dependency>
- <!-- Dubbo dependencies -->
+ <!-- Aapche Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-bom</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
- <!-- Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
<exclusions>
@@ -100,20 +97,6 @@
</exclusions>
</dependency>
- <!-- Dubbo Nacos registry dependency -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo-registry-nacos</artifactId>
- <version>${dubbo-registry-nacos.version}</version>
- </dependency>
-
- <!-- Keep latest Nacos client version -->
- <dependency>
- <groupId>com.alibaba.nacos</groupId>
- <artifactId>nacos-client</artifactId>
- <version>${nacos-client.version}</version>
- </dependency>
-
</dependencies>
</dependencyManagement>
@@ -127,6 +110,19 @@
<enabled>false</enabled>
</snapshots>
</repository>
+
+ <repository>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+
<repository>
<id>spring-milestone</id>
<name>Spring Milestone</name>
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/pom.xml
index ee6a6ff..4f01fe1 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/pom.xml
+++ b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-auto-configure-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-auto-configure-consumer-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Auto-Configure :: Consumer Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Auto-Configure :: Consumer Sample</name>
<dependencies>
<!-- Spring Boot dependencies -->
@@ -36,18 +37,18 @@
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
similarity index 85%
rename from dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
rename to dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
index c83754a..be83edf 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.java
@@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Reference;
-
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationRunner;
@@ -29,22 +28,22 @@
/**
* Dubbo Auto Configuration Consumer Bootstrap
*
- * @since 1.0.0
+ * @since 2.7.0
*/
@EnableAutoConfiguration
public class DubboAutoConfigurationConsumerBootstrap {
private final Logger logger = LoggerFactory.getLogger(getClass());
- @Reference(version = "1.0.0", url = "dubbo://localhost:12345")
+ @Reference(version = "1.0.0", url = "dubbo://127.0.0.1:12345")
private DemoService demoService;
+ public static void main(String[] args) {
+ SpringApplication.run(DubboAutoConfigurationConsumerBootstrap.class).close();
+ }
+
@Bean
public ApplicationRunner runner() {
return args -> logger.info(demoService.sayHello("mercyblitz"));
}
-
- public static void main(String[] args) {
- SpringApplication.run(DubboAutoConfigurationConsumerBootstrap.class).close();
- }
}
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/pom.xml b/dubbo-spring-boot-samples/auto-configure-samples/pom.xml
index c994694..3df5bf5 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/pom.xml
+++ b/dubbo-spring-boot-samples/auto-configure-samples/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,8 +27,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-auto-configure-samples</artifactId>
- <name>Dubbo Spring Boot Samples : Auto-Configure</name>
- <description>Dubbo Spring Boot Auto-Configure Samples</description>
+ <name>Apache Dubbo Spring Boot :: Samples : Auto-Configure</name>
+ <description>Apache Dubbo Spring Boot Auto-Configure Samples</description>
<packaging>pom</packaging>
<modules>
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/pom.xml
index aee1aa9..a7aca3a 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/pom.xml
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-auto-configure-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-auto-configure-provider-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Auto-Configure :: Provider Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Auto-Configure :: Provider Sample</name>
<dependencies>
@@ -37,18 +38,18 @@
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
similarity index 83%
rename from dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
rename to dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
index 012746b..bd61706 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboAutoConfigurationProviderBootstrap.java
@@ -14,11 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
-import com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService;
-
-import org.springframework.boot.WebApplicationType;
+import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -26,14 +24,13 @@
* Dubbo Auto-Configuration Provider Bootstrap
*
* @see DefaultDemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@EnableAutoConfiguration
public class DubboAutoConfigurationProviderBootstrap {
public static void main(String[] args) {
new SpringApplicationBuilder(DubboAutoConfigurationProviderBootstrap.class)
- .web(WebApplicationType.NONE)
.run(args);
}
}
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
similarity index 87%
rename from dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
rename to dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
index 20fe666..325b19a 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
@@ -14,18 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.service;
+package org.apache.dubbo.spring.boot.demo.provider.service;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Service;
-
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.springframework.beans.factory.annotation.Value;
/**
* Default {@link DemoService}
*
* @see DemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@Service(version = "1.0.0")
public class DefaultDemoService implements DemoService {
diff --git a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
index 85e8400..b3de3d9 100644
--- a/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/auto-configure-samples/provider-sample/src/main/resources/application.properties
@@ -1,7 +1,7 @@
# Spring boot application
spring.application.name=dubbo-auto-configuration-provider-demo
-# Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service
-dubbo.scan.base-packages=com.alibaba.boot.dubbo.demo.provider.service
+# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
## dubbo.application.name=${spring.application.name}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/pom.xml
deleted file mode 100644
index 87d4af9..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/pom.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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
-
- http://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.
- -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>com.alibaba.boot.samples</groupId>
- <artifactId>dubbo-spring-boot-registry-nacos-samples</artifactId>
- <version>${revision}</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-spring-boot-registry-nacos-consumer-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Nacos :: Consumer Sample</name>
-
- <dependencies>
- <!-- Spring Boot dependencies -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.boot</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>${revision}</version>
- </dependency>
-
- <!-- Dubbo -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.boot.samples</groupId>
- <artifactId>dubbo-spring-boot-sample-api</artifactId>
- <version>${revision}</version>
- </dependency>
-
- <!-- Netty -->
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
-
- <!-- Dubbo Nacos registry dependency -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo-registry-nacos</artifactId>
- </dependency>
-
- <!-- Keep latest Nacos client version -->
- <dependency>
- <groupId>com.alibaba.nacos</groupId>
- <artifactId>nacos-client</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
deleted file mode 100644
index 68b690f..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryNacosConsumerBootstrap.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.demo.consumer.bootstrap;
-
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Reference;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Bean;
-
-/**
- * Dubbo Registry Nacos Consumer Bootstrap
- */
-@EnableAutoConfiguration
-public class DubboRegistryNacosConsumerBootstrap {
-
- private final Logger logger = LoggerFactory.getLogger(getClass());
-
- @Reference(version = "${demo.service.version}")
- private DemoService demoService;
-
- @Bean
- public ApplicationRunner runner() {
- return args -> logger.info(demoService.sayHello("mercyblitz"));
- }
-
- public static void main(String[] args) {
- SpringApplication.run(DubboRegistryNacosConsumerBootstrap.class).close();
- }
-}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/resources/application.yml b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/resources/application.yml
deleted file mode 100644
index 7889cf7..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/consumer-sample/src/main/resources/application.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-spring:
- application:
- name: dubbo-registry-nacos-consumer-sample
-
-demo:
- service:
- version: 1.0.0
-
-dubbo:
- registry:
- address: nacos://127.0.0.1:8848
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/pom.xml
deleted file mode 100644
index 339a2e6..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/pom.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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
-
- http://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.
- -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>com.alibaba.boot.samples</groupId>
- <artifactId>dubbo-spring-boot-registry-nacos-samples</artifactId>
- <version>${revision}</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-spring-boot-registry-nacos-provider-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Nacos :: Provider Sample</name>
-
- <dependencies>
-
- <!-- Spring Boot dependencies -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.boot</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>${revision}</version>
- </dependency>
-
- <!-- Dubbo -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.boot.samples</groupId>
- <artifactId>dubbo-spring-boot-sample-api</artifactId>
- <version>${revision}</version>
- </dependency>
-
- <!-- Netty -->
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
-
- <!-- Dubbo Nacos registry dependency -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo-registry-nacos</artifactId>
- </dependency>
-
- <!-- Keep latest Nacos client version -->
- <dependency>
- <groupId>com.alibaba.nacos</groupId>
- <artifactId>nacos-client</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-
-</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
deleted file mode 100644
index 361a392..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryNacosProviderBootstrap.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.demo.provider.bootstrap;
-
-import com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService;
-
-import org.springframework.boot.WebApplicationType;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-
-/**
- * Dubbo Registry ZooKeeper Provider Bootstrap
- *
- * @see DefaultDemoService
- * @since 1.0.0
- */
-@EnableAutoConfiguration
-public class DubboRegistryNacosProviderBootstrap {
-
- public static void main(String[] args) {
- new SpringApplicationBuilder(DubboRegistryNacosProviderBootstrap.class)
- .web(WebApplicationType.NONE)
- .run();
- }
-}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/resources/application.properties
deleted file mode 100644
index 91635fb..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/resources/application.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Spring boot application
-spring.application.name=dubbo-registry-nacos-provider-sample
-
-# Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service
-dubbo.scan.base-packages=com.alibaba.boot.dubbo.demo.provider.service
-
-# Dubbo Application
-## The default value of dubbo.application.name is ${spring.application.name}
-## dubbo.application.name=${spring.application.name}
-
-# Dubbo Protocol
-dubbo.protocol.name=dubbo
-## Random port
-dubbo.protocol.port=-1
-
-## Dubbo Registry
-dubbo.registry.address=nacos://127.0.0.1:8848
-
-## DemoService version
-demo.service.version=1.0.0
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/pom.xml
index c51685c..1941193 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/pom.xml
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-registry-zookeeper-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-registry-zookeeper-consumer-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Zookeeper :: Consumer Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper :: Consumer Sample</name>
<dependencies>
<!-- Spring Boot dependencies -->
@@ -36,18 +37,18 @@
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
@@ -57,6 +58,16 @@
<artifactId>curator-framework</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-recipes</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ </dependency>
+
</dependencies>
<build>
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
similarity index 90%
rename from dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
rename to dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
index e238028..81829ca 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboRegistryZooKeeperConsumerBootstrap.java
@@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Reference;
-
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationRunner;
@@ -37,12 +36,12 @@
@Reference(version = "${demo.service.version}")
private DemoService demoService;
+ public static void main(String[] args) {
+ SpringApplication.run(DubboRegistryZooKeeperConsumerBootstrap.class).close();
+ }
+
@Bean
public ApplicationRunner runner() {
return args -> logger.info(demoService.sayHello("mercyblitz"));
}
-
- public static void main(String[] args) {
- SpringApplication.run(DubboRegistryZooKeeperConsumerBootstrap.class).close();
- }
}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/pom.xml b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/pom.xml
index f27101a..741dce9 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/pom.xml
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,8 +27,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-registry-zookeeper-samples</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Zookeeper</name>
- <description>Dubbo Spring Boot Registry Zookeeper Samples</description>
+ <name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper</name>
+ <description>Apache Dubbo Spring Boot Registry Zookeeper Samples</description>
<packaging>pom</packaging>
<modules>
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/pom.xml
index 24088b9..c41c446 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/pom.xml
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-registry-zookeeper-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-registry-zookeeper-provider-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Registry Zookeeper :: Provider Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper :: Provider Sample</name>
<dependencies>
@@ -37,19 +38,19 @@
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<!-- Dubbo -->
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
@@ -65,6 +66,11 @@
<artifactId>curator-framework</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-recipes</artifactId>
+ </dependency>
+
</dependencies>
<build>
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
deleted file mode 100644
index fcd3aa5..0000000
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.demo.provider.service;
-
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Service;
-
-import org.springframework.beans.factory.annotation.Value;
-
-/**
- * Default {@link DemoService}
- *
- * @see DemoService
- * @since 1.0.0
- */
-@Service(version = "${demo.service.version}")
-public class DefaultDemoService implements DemoService {
-
- /**
- * The default value of ${dubbo.application.name} is ${spring.application.name}
- */
- @Value("${dubbo.application.name}")
- private String serviceName;
-
- @Override
- public String sayHello(String name) {
- return String.format("[%s] : Hello, %s", serviceName, name);
- }
-}
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
similarity index 87%
rename from dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
rename to dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
index bcc9407..5f20c85 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboRegistryZooKeeperProviderBootstrap.java
@@ -14,11 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
-import com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService;
-
-import org.springframework.boot.WebApplicationType;
+import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
@@ -29,14 +27,13 @@
* Dubbo Registry ZooKeeper Provider Bootstrap
*
* @see DefaultDemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@EnableAutoConfiguration
public class DubboRegistryZooKeeperProviderBootstrap {
public static void main(String[] args) {
new SpringApplicationBuilder(DubboRegistryZooKeeperProviderBootstrap.class)
- .web(WebApplicationType.NONE)
.listeners((ApplicationListener<ApplicationEnvironmentPreparedEvent>) event -> {
Environment environment = event.getEnvironment();
int port = environment.getProperty("embedded.zookeeper.port", int.class);
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/EmbeddedZooKeeper.java b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/EmbeddedZooKeeper.java
similarity index 98%
rename from dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/EmbeddedZooKeeper.java
rename to dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/EmbeddedZooKeeper.java
index ced6344..1758fc8 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/EmbeddedZooKeeper.java
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/EmbeddedZooKeeper.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
import org.apache.zookeeper.server.ServerConfig;
@@ -109,6 +109,14 @@
}
/**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAutoStartup() {
+ return this.autoStartup;
+ }
+
+ /**
* Specify whether to start automatically. Default is true.
*
* @param autoStartup whether to start automatically
@@ -121,8 +129,8 @@
* {@inheritDoc}
*/
@Override
- public boolean isAutoStartup() {
- return this.autoStartup;
+ public int getPhase() {
+ return this.phase;
}
/**
@@ -138,14 +146,6 @@
* {@inheritDoc}
*/
@Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
public boolean isRunning() {
return (zkServerThread != null);
}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
similarity index 87%
rename from dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
rename to dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
index fcd3aa5..bf5f80d 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
@@ -14,18 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.service;
+package org.apache.dubbo.spring.boot.demo.provider.service;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Service;
-
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.springframework.beans.factory.annotation.Value;
/**
* Default {@link DemoService}
*
* @see DemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@Service(version = "${demo.service.version}")
public class DefaultDemoService implements DemoService {
diff --git a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/resources/application.properties
index 30aa324..d66c19d 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/dubbo-registry-zookeeper-samples/provider-sample/src/main/resources/application.properties
@@ -1,8 +1,7 @@
# Spring boot application
spring.application.name=dubbo-registry-zookeeper-provider-sample
-
-# Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service
-dubbo.scan.base-packages=com.alibaba.boot.dubbo.demo.provider.service
+# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/pom.xml b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/pom.xml
index 97fb10a..893dd4b 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/pom.xml
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-externalized-configuration-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,28 +27,40 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-externalized-configuration-consumer-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Externalized Configuration :: Consumer Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration :: Consumer Sample</name>
<dependencies>
<!-- Spring Boot dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
+ <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ </dependency>
+
+ <!-- Dubbo Spring Boot dependencies -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-actuator</artifactId>
+ <version>${revision}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
similarity index 75%
rename from dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
rename to dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
index 2b3778d..39f75b8 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/com/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/bootstrap/DubboExternalizedConfigurationConsumerBootstrap.java
@@ -14,22 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.consumer.bootstrap;
+package org.apache.dubbo.spring.boot.demo.consumer.bootstrap;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Reference;
-
+import org.apache.dubbo.config.annotation.Reference;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
/**
* Dubbo Externalized Configuration Consumer Bootstrap
*/
@EnableAutoConfiguration
+@RestController
public class DubboExternalizedConfigurationConsumerBootstrap {
private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -37,12 +40,17 @@
@Reference(version = "${demo.service.version}", url = "${demo.service.url}")
private DemoService demoService;
+ public static void main(String[] args) {
+ SpringApplication.run(DubboExternalizedConfigurationConsumerBootstrap.class);
+ }
+
+ @GetMapping("/say-hello")
+ public String sayHello(@RequestParam String name) {
+ return demoService.sayHello(name);
+ }
+
@Bean
public ApplicationRunner runner() {
return args -> logger.info(demoService.sayHello("mercyblitz"));
}
-
- public static void main(String[] args) {
- SpringApplication.run(DubboExternalizedConfigurationConsumerBootstrap.class).close();
- }
}
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/resources/application.yml b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/resources/application.yml
index e3aef42..3f98bc1 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/resources/application.yml
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/consumer-sample/src/main/resources/application.yml
@@ -2,6 +2,44 @@
application:
name: dubbo-externalized-configuration-consumer-sample
+management:
+ endpoints:
+ web:
+ exposure:
+ include: '*'
+ endpoint:
+ dubbo:
+ enabled: true
+ dubboshutdown:
+ enabled: true
+ dubboconfigs:
+ enabled: true
+ dubboservices:
+ enabled: true
+ dubboreferences:
+ enabled: true
+ dubboproperties:
+ enabled: true
+ security:
+ ## Deprecated 2.x
+ enabled: false
+
+## For Spring Boot 1.x demo
+endpoints:
+ dubbo:
+ enabled: true
+ sensitive: false
+ dubboshutdown:
+ enabled: true
+ dubboconfigs:
+ enabled: true
+ dubboservices:
+ enabled: true
+ dubboreferences:
+ enabled: true
+ dubboproperties:
+ enabled: true
+
demo:
service:
version: 1.0.0
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/pom.xml b/dubbo-spring-boot-samples/externalized-configuration-samples/pom.xml
index 9bf23e9..86e26ad 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/pom.xml
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,8 +27,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-externalized-configuration-samples</artifactId>
- <name>Dubbo Spring Boot Samples : Externalized Configuration</name>
- <description>Dubbo Spring Boot Externalized Configuration Samples</description>
+ <name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration</name>
+ <description>Apache Dubbo Spring Boot Externalized Configuration Samples</description>
<packaging>pom</packaging>
<modules>
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/pom.xml b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/pom.xml
index 093787a..47a2bb1 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/pom.xml
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-externalized-configuration-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-externalized-configuration-provider-sample</artifactId>
- <name>Dubbo Spring Boot Samples : Externalized Configuration :: Provider Sample</name>
+ <name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration :: Provider Sample</name>
<dependencies>
@@ -37,18 +38,18 @@
</dependency>
<dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
- <groupId>com.alibaba</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
deleted file mode 100644
index fcd3aa5..0000000
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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
- *
- * http://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.boot.dubbo.demo.provider.service;
-
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Service;
-
-import org.springframework.beans.factory.annotation.Value;
-
-/**
- * Default {@link DemoService}
- *
- * @see DemoService
- * @since 1.0.0
- */
-@Service(version = "${demo.service.version}")
-public class DefaultDemoService implements DemoService {
-
- /**
- * The default value of ${dubbo.application.name} is ${spring.application.name}
- */
- @Value("${dubbo.application.name}")
- private String serviceName;
-
- @Override
- public String sayHello(String name) {
- return String.format("[%s] : Hello, %s", serviceName, name);
- }
-}
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
similarity index 84%
rename from dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
rename to dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
index 6264c17..2671f75 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/bootstrap/DubboExternalizedConfigurationProviderBootstrap.java
@@ -14,11 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.bootstrap;
+package org.apache.dubbo.spring.boot.demo.provider.bootstrap;
-import com.alibaba.boot.dubbo.demo.provider.service.DefaultDemoService;
-
-import org.springframework.boot.WebApplicationType;
+import org.apache.dubbo.spring.boot.demo.provider.service.DefaultDemoService;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -26,14 +24,13 @@
* Dubbo Externalized Configuration Provider Bootstrap
*
* @see DefaultDemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@EnableAutoConfiguration
public class DubboExternalizedConfigurationProviderBootstrap {
public static void main(String[] args) {
new SpringApplicationBuilder(DubboExternalizedConfigurationProviderBootstrap.class)
- .web(WebApplicationType.NONE)
.run(args);
}
}
diff --git a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
similarity index 87%
copy from dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
copy to dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
index fcd3aa5..bf5f80d 100644
--- a/dubbo-spring-boot-samples/dubbo-registry-nacos-samples/provider-sample/src/main/java/com/alibaba/boot/dubbo/demo/provider/service/DefaultDemoService.java
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/java/org/apache/dubbo/spring/boot/demo/provider/service/DefaultDemoService.java
@@ -14,18 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.provider.service;
+package org.apache.dubbo.spring.boot.demo.provider.service;
-import com.alibaba.boot.dubbo.demo.consumer.DemoService;
-import com.alibaba.dubbo.config.annotation.Service;
-
+import org.apache.dubbo.config.annotation.Service;
+import org.apache.dubbo.spring.boot.demo.consumer.DemoService;
import org.springframework.beans.factory.annotation.Value;
/**
* Default {@link DemoService}
*
* @see DemoService
- * @since 1.0.0
+ * @since 2.7.0
*/
@Service(version = "${demo.service.version}")
public class DefaultDemoService implements DemoService {
diff --git a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
index 398e996..400759a 100644
--- a/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
+++ b/dubbo-spring-boot-samples/externalized-configuration-samples/provider-sample/src/main/resources/application.properties
@@ -1,8 +1,7 @@
# Spring boot application
spring.application.name=dubbo-externalized-configuration-provider-sample
-
-# Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service
-dubbo.scan.base-packages=com.alibaba.boot.dubbo.demo.provider.service
+# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
+dubbo.scan.base-packages=org.apache.dubbo.spring.boot.demo.provider.service
# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
diff --git a/dubbo-spring-boot-samples/pom.xml b/dubbo-spring-boot-samples/pom.xml
index 991c839..450f328 100644
--- a/dubbo-spring-boot-samples/pom.xml
+++ b/dubbo-spring-boot-samples/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,24 +19,23 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-parent</artifactId>
<version>${revision}</version>
<relativePath>../dubbo-spring-boot-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<packaging>pom</packaging>
- <name>Dubbo Spring Boot Samples</name>
- <description>Dubbo Spring Boot Samples</description>
+ <name>Apache Dubbo Spring Boot :: Samples</name>
+ <description>Apache Dubbo Spring Boot :: Samples</description>
<modules>
<module>sample-api</module>
<module>auto-configure-samples</module>
<module>externalized-configuration-samples</module>
- <module>dubbo-registry-nacos-samples</module>
<module>dubbo-registry-zookeeper-samples</module>
</modules>
diff --git a/dubbo-spring-boot-samples/sample-api/pom.xml b/dubbo-spring-boot-samples/sample-api/pom.xml
index e6a6746..25964a5 100644
--- a/dubbo-spring-boot-samples/sample-api/pom.xml
+++ b/dubbo-spring-boot-samples/sample-api/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot.samples</groupId>
+ <groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
@@ -26,6 +27,6 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
- <name>Dubbo Spring Boot Samples : API</name>
+ <name>Apache Dubbo Spring Boot :: Samples : API</name>
</project>
\ No newline at end of file
diff --git a/dubbo-spring-boot-samples/sample-api/src/main/java/com/alibaba/boot/dubbo/demo/consumer/DemoService.java b/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java
similarity index 92%
rename from dubbo-spring-boot-samples/sample-api/src/main/java/com/alibaba/boot/dubbo/demo/consumer/DemoService.java
rename to dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java
index bff1309..905e94e 100644
--- a/dubbo-spring-boot-samples/sample-api/src/main/java/com/alibaba/boot/dubbo/demo/consumer/DemoService.java
+++ b/dubbo-spring-boot-samples/sample-api/src/main/java/org/apache/dubbo/spring/boot/demo/consumer/DemoService.java
@@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.alibaba.boot.dubbo.demo.consumer;
+package org.apache.dubbo.spring.boot.demo.consumer;
/**
* Demo Service interface
*
- * @since 1.0.0
+ * @since 2.7.0
*/
public interface DemoService {
diff --git a/dubbo-spring-boot-starter/pom.xml b/dubbo-spring-boot-starter/pom.xml
index 92f5c7e..d71a846 100644
--- a/dubbo-spring-boot-starter/pom.xml
+++ b/dubbo-spring-boot-starter/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-parent</artifactId>
<version>${revision}</version>
<relativePath>../dubbo-spring-boot-parent</relativePath>
@@ -27,8 +28,8 @@
<artifactId>dubbo-spring-boot-starter</artifactId>
<packaging>jar</packaging>
- <name>Dubbo Spring Boot Starter</name>
- <description>Dubbo Spring Boot Starter</description>
+ <name>Apache Dubbo Spring Boot :: Starter</name>
+ <description>Apache Dubbo Spring Boot Starter</description>
<dependencies>
@@ -39,21 +40,8 @@
<optional>true</optional>
</dependency>
- <!-- ZK -->
<dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${revision}</version>
</dependency>
diff --git a/pom.xml b/pom.xml
index a223d60..17f0e03 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -19,25 +20,25 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>19</version>
</parent>
- <groupId>com.alibaba.boot</groupId>
+ <groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-project</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
- <name>Dubbo Spring Boot Project</name>
- <description>Dubbo Spring Boot Project</description>
+ <name>Apache Dubbo Spring Boot Project</name>
+ <description>Apache Dubbo Spring Boot Project</description>
<url>https://github.com/apache/incubator-dubbo-spring-boot-project</url>
<properties>
<maven_javadoc_version>3.0.1</maven_javadoc_version>
<maven_surefire_version>2.19.1</maven_surefire_version>
- <revision>0.2.1</revision>
+ <revision>2.7.0</revision>
</properties>
<modules>
@@ -45,8 +46,9 @@
<module>dubbo-spring-boot-distribution</module>
<module>dubbo-spring-boot-autoconfigure</module>
<module>dubbo-spring-boot-starter</module>
- <module>dubbo-spring-boot-samples</module>
<module>dubbo-spring-boot-actuator</module>
+ <module>dubbo-spring-boot-compatible</module>
+ <module>dubbo-spring-boot-samples</module>
</modules>
<organization>
@@ -157,4 +159,34 @@
</profile>
</profiles>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.1.0</version>
+ <configuration>
+ <updatePomFile>true</updatePomFile>
+ <flattenMode>resolveCiFriendliesOnly</flattenMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>flatten</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>flatten.clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file