Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to master (#724) #1

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Dubbo
Copyright 2018-2019 The Apache Software Foundation
Copyright 2018-2020 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
You can introduce the latest `dubbo-spring-boot-starter` to your project by adding the following dependency to your pom.xml
```xml
<properties>
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
<dubbo.version>2.7.6</dubbo.version>
<spring-boot.version>2.3.0.RELEASE</spring-boot.version>
<dubbo.version>2.7.7</dubbo.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -50,7 +50,7 @@ You can introduce the latest `dubbo-spring-boot-starter` to your project by addi
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>2.7.6</version>
<version>2.7.7</version>
</dependency>
</dependencies>
```
Expand Down Expand Up @@ -86,7 +86,7 @@ If you still use the legacy Dubbo whose version is less than 2.7.0, please use t

### Build from Source

If you'd like to attempt to experience latest features, you also can build from source as follow:
If you'd like to attempt to experience the latest features, you also can build from the source code as follow:

1. Maven install current project in your local repository.
> Maven install = `mvn install`
Expand Down Expand Up @@ -150,7 +150,7 @@ public interface DemoService {
# 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
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service

# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
Expand Down
12 changes: 6 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
您可以为您的工程引入最新 `dubbo-spring-boot-starter` 的发布,增加以下依赖到工程的 `pom.xml` 文件中:
```xml
<properties>
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
<dubbo.version>2.7.6</dubbo.version>
<spring-boot.version>2.3.0.RELEASE</spring-boot.version>
<dubbo.version>2.7.7</dubbo.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>2.7.6</version>
<version>2.7.7</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -177,7 +177,7 @@ public interface DemoService {
# 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
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service

# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
Expand Down Expand Up @@ -244,9 +244,9 @@ public interface DemoService {

如果您在使用 Dubbo Spring Boot 中遇到任何问题或者有什么建议? 我们非常需要您的支持!

- 如果您需要升级版本,请提前阅读[发布公告](https://github.com/apache/dubbo-spring-boot-project/releases),了解最新的特性和问题修复。
- 如果您需要升级版本,请提前阅读[发布公告](https://github.com/dubbo/dubbo-spring-boot-project/releases),了解最新的特性和问题修复。
- 如果您遇到任何问题 ,您可以订阅 [Dubbo 用户邮件列表](mailto:[email protected])。
- 问题反馈,您可以在 [issues](https://github.com/apache/dubbo-spring-boot-project/issues) 提出您遇到的使用问题。
- 问题反馈,您可以在 [issues](https://github.com/dubbo/dubbo-spring-boot-project/issues) 提出您遇到的使用问题。



Expand Down
26 changes: 13 additions & 13 deletions dubbo-spring-boot-actuator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Actuator endpoint `dubbo` supports Actuator Endpoints :
"dubbo.protocol.port": "12345",
"dubbo.registry.address": "N/A",
"dubbo.registry.id": "my-registry",
"dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.demo.provider.service"
"dubbo.scan.basePackages": "org.apache.dubbo.spring.boot.sample.provider.service"
}
```

Expand All @@ -217,7 +217,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a

```json
{
"[email protected].demo.api.DemoService#defaultDemoService": {
"[email protected].sample.api.DemoService#defaultDemoService": {
"accesslog": null,
"actives": null,
"cache": null,
Expand All @@ -233,9 +233,9 @@ The structure of JSON is simple Key-Value format , the key is property name as a
"filter": "",
"generic": "false",
"group": null,
"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",
"id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"layer": null,
"listener": "",
"loadbalance": null,
Expand All @@ -245,7 +245,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
"onconnect": null,
"ondisconnect": null,
"owner": null,
"path": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"path": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"proxy": null,
"retries": null,
"scope": null,
Expand All @@ -254,7 +254,7 @@ The structure of JSON is simple Key-Value format , the key is property name as a
"timeout": null,
"token": null,
"unexported": false,
"uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
"uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
"validation": null,
"version": "1.0.0",
"warmup": null,
Expand All @@ -274,7 +274,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v

```json
{
"private org.apache.dubbo.spring.boot.demo.api.DemoService org.apache.dubbo.spring.boot.demo.consumer.controller.DemoConsumerController.demoService": {
"private org.apache.dubbo.spring.boot.sample.api.DemoService org.apache.dubbo.spring.boot.sample.consumer.controller.DemoConsumerController.demoService": {
"actives": null,
"cache": null,
"callbacks": null,
Expand All @@ -285,17 +285,17 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
"filter": "",
"generic": null,
"group": null,
"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",
"id": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"interface": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"interfaceClass": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"layer": null,
"lazy": null,
"listener": "",
"loadbalance": null,
"local": null,
"merger": null,
"mock": null,
"objectType": "org.apache.dubbo.spring.boot.demo.api.DemoService",
"objectType": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"onconnect": null,
"ondisconnect": null,
"owner": null,
Expand All @@ -310,7 +310,7 @@ The key is the Bean name of `ServiceBean` , `ServiceBean`'s properties compose v
"stub": null,
"stubevent": null,
"timeout": null,
"uniqueServiceName": "org.apache.dubbo.spring.boot.demo.api.DemoService:1.0.0",
"uniqueServiceName": "org.apache.dubbo.spring.boot.sample.api.DemoService:1.0.0",
"url": "dubbo://localhost:12345",
"validation": null,
"version": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
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.apache.dubbo.spring.boot.actuate.endpoint.condition.CompatibleConditionalOnEnabledEndpoint;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
Expand All @@ -44,42 +45,42 @@ public class DubboEndpointAnnotationAutoConfiguration {

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboMetadataEndpoint dubboEndpoint() {
return new DubboMetadataEndpoint();
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboConfigsMetadataEndpoint dubboConfigsMetadataEndpoint() {
return new DubboConfigsMetadataEndpoint();
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboPropertiesMetadataEndpoint dubboPropertiesEndpoint() {
return new DubboPropertiesMetadataEndpoint();
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboReferencesMetadataEndpoint dubboReferencesMetadataEndpoint() {
return new DubboReferencesMetadataEndpoint();
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboServicesMetadataEndpoint dubboServicesMetadataEndpoint() {
return new DubboServicesMetadataEndpoint();
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@CompatibleConditionalOnEnabledEndpoint
public DubboShutdownEndpoint dubboShutdownEndpoint() {
return new DubboShutdownEndpoint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
*/
package org.apache.dubbo.spring.boot.actuate.endpoint;

import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.annotation.DubboReference;
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}
* {@link DubboReference} Metadata {@link Endpoint}
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
*/
package org.apache.dubbo.spring.boot.actuate.endpoint;

import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.config.annotation.DubboService;
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}
* {@link DubboService} Metadata {@link Endpoint}
*
* @since 2.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* 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.condition;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.EndpointExtension;
import org.springframework.context.annotation.Conditional;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* {@link Conditional} that checks whether or not an endpoint is enabled, which is compatible with
* org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint ([2.0.x, 2.2.x])
* org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint
*
* @see CompatibleOnEnabledEndpointCondition
* @since 2.7.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
@Documented
@Conditional(CompatibleOnEnabledEndpointCondition.class)
public @interface CompatibleConditionalOnEnabledEndpoint {

/**
* The endpoint type that should be checked. Inferred when the return type of the
* {@code @Bean} method is either an {@link Endpoint @Endpoint} or an
* {@link EndpointExtension @EndpointExtension}.
*
* @return the endpoint type to check
*/
Class<?> endpoint() default Void.class;
}
Loading