Skip to content

Commit

Permalink
0.2.1 (#330)
Browse files Browse the repository at this point in the history
* Fix #169

* Polish : #324 & #325

* Polish : #315

* Polish : #321

* Polish : #321

* Polish : #321 for test case

* Polish : Update Demos

* Polish : Update version to be 0.2.1

* Polish : #319

* Polish : #226

* Polish : #309

* Fix the test case's bugs

* Fix the test case's bugs

* Fix a JavaDoc issue

* Update SNAPSHOT and add exclude list

* Update SNAPSHOT to be 0.2.1-SNAPSHOT

* Update JDK versions

* Update JDK versions
  • Loading branch information
mercyblitz authored Dec 18, 2018
1 parent 0fad8dc commit fb2be00
Show file tree
Hide file tree
Showing 35 changed files with 449 additions and 144 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: java
sudo: false # faster builds

jdk:
- oraclejdk10
- oraclejdk9
- openjdk10
- openjdk9
- oraclejdk8

script: "mvn clean package"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can introduce the latest `dubbo-spring-boot-starter` to your project by addi
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>

<!-- Dubbo -->
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>

<!-- Dubbo -->
Expand Down
24 changes: 12 additions & 12 deletions dubbo-spring-boot-actuator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can introduce the latest `dubbo-spring-boot-actuator` to your project by ad
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-actuator</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>
```
If your project failed to resolve the dependency, try to add the following repository:
Expand Down Expand Up @@ -162,11 +162,11 @@ Actuator endpoint `dubbo` supports Actuator Endpoints :
| ID | Enabled | HTTP URI | HTTP Method | Description | Content Type |
| ------------------- | ----------- | ----------------------------------- | ------------------ | ------------------ | ------------------ |
| `dubbo` | `true` | `/actuator/dubbo` | `GET` | Exposes Dubbo's meta data | `application/json` |
| `dubbo-properties` | `true` | `/actuator/dubbo/properties` | `GET` | Exposes all Dubbo's Properties | `application/json` |
| `dubbo-services` | `false` | `/dubbo/services` | `GET` | Exposes all Dubbo's `ServiceBean` | `application/json` |
| `dubbo-references` | `false` | `/actuator/dubbo/references` | `GET` | Exposes all Dubbo's `ReferenceBean` | `application/json` |
| `dubbo-configs` | `true` | `/actuator/dubbo/configs` | `GET` | Exposes all Dubbo's `*Config` | `application/json` |
| `dubbo-shutdown` | `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` |



Expand All @@ -184,7 +184,7 @@ Actuator endpoint `dubbo` supports Actuator Endpoints :
{
"timestamp": 1516623290166,
"versions": {
"dubbo-spring-boot": "0.2.0"
"dubbo-spring-boot": "0.2.0",
"dubbo": "2.6.2"
},
"urls": {
Expand Down Expand Up @@ -503,10 +503,10 @@ Dubbo Spring Boot providers actuator endpoints , however some of them are disabl
```properties
# Enables Dubbo All Endpoints
management.endpoint.dubbo.enabled = true
management.endpoint.dubbo-shutdown.enabled = true
management.endpoint.dubbo-configs.enabled = true
management.endpoint.dubbo-services.enabled = true
management.endpoint.dubbo-references.enabled = true
management.endpoint.dubbo-properties.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
```

4 changes: 2 additions & 2 deletions dubbo-spring-boot-actuator/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>

<!-- Production-Ready 特性 -->
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-actuator</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>

...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@
*/
package com.alibaba.boot.dubbo.actuate.endpoint;

import com.alibaba.dubbo.config.*;
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;

Expand All @@ -32,7 +43,7 @@
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 0.2.0
*/
@Endpoint(id = "dubbo-configs")
@Endpoint(id = "dubboConfigs")
public class DubboConfigsMetadataEndpoint extends AbstractDubboEndpoint {

@ReadOperation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@

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 java.util.LinkedHashMap;
import java.util.Map;

import static com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpoint.DUBBO_ENDPOINT_ID;
import static com.alibaba.boot.dubbo.util.DubboUtils.*;
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;

/**
* Actuator {@link Endpoint} to expose Dubbo Meta Data
Expand All @@ -34,21 +38,9 @@
* @see Endpoint
* @since 1.0.0
*/
@Endpoint(id = DUBBO_ENDPOINT_ID)
@Endpoint(id = "dubbo")
public class DubboEndpoint {

public static final String DUBBO_ENDPOINT_ID = "dubbo";

public static final String DUBBO_SHUTDOWN_ENDPOINT_ID = DUBBO_ENDPOINT_ID + "-shutdown";

public static final String DUBBO_CONFIGS_ENDPOINT_ID = DUBBO_ENDPOINT_ID + "-configs";

public static final String DUBBO_SERVICES_ENDPOINT_ID = DUBBO_ENDPOINT_ID + "-services";

public static final String DUBBO_REFERENCES_ENDPOINT_ID = DUBBO_ENDPOINT_ID + "-references";

public static final String DUBBO_PROPERTIES_ENDPOINT_ID = DUBBO_ENDPOINT_ID + "-properties";

@ReadOperation
public Map<String, Object> invoke() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import java.util.SortedMap;

import static com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpoint.DUBBO_PROPERTIES_ENDPOINT_ID;
import static com.alibaba.boot.dubbo.util.DubboUtils.filterDubboProperties;

/**
Expand All @@ -30,7 +29,7 @@
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 1.0.0
*/
@Endpoint(id = DUBBO_PROPERTIES_ENDPOINT_ID)
@Endpoint(id = "dubboProperties")
public class DubboPropertiesEndpoint extends AbstractDubboEndpoint {

@ReadOperation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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.springframework.beans.factory.annotation.InjectionMetadata;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
Expand All @@ -32,7 +33,7 @@
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 1.0.0
*/
@Endpoint(id = "dubbo-references")
@Endpoint(id = "dubboReferences")
public class DubboReferencesMetadataEndpoint extends AbstractDubboEndpoint {

@ReadOperation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;

Expand All @@ -30,7 +31,7 @@
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 0.2.0
*/
@Endpoint(id = "dubbo-services")
@Endpoint(id = "dubboServices")
public class DubboServicesMetadataEndpoint extends AbstractDubboEndpoint {

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

Expand All @@ -34,7 +35,7 @@
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 0.2.0
*/
@Endpoint(id = "dubbo-shutdown")
@Endpoint(id = "dubboShutdown")
public class DubboShutdownEndpoint extends AbstractDubboEndpoint {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.alibaba.boot.dubbo.actuate.health;

import com.alibaba.dubbo.common.status.StatusChecker;

import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.context.properties.ConfigurationProperties;

Expand Down Expand Up @@ -53,7 +54,6 @@ public void setStatus(Status status) {

/**
* The nested class for {@link StatusChecker}'s names
* <p>
* <pre>
* registry=com.alibaba.dubbo.registry.status.RegistryStatusChecker
* spring=com.alibaba.dubbo.config.spring.status.SpringStatusChecker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

# Set enabled for Dubbo Endpoints
management.endpoint.dubbo.enabled = true
management.endpoint.dubbo-shutdown.enabled = false
management.endpoint.dubbo-configs.enabled = true
management.endpoint.dubbo-services.enabled = false
management.endpoint.dubbo-references.enabled = false
management.endpoint.dubbo-properties.enabled = true
management.endpoint.dubboShutdown.enabled = false
management.endpoint.dubboConfigs.enabled = true
management.endpoint.dubboServices.enabled = false
management.endpoint.dubboReferences.enabled = false
management.endpoint.dubboProperties.enabled = true

# "management.endpoints.web.base-path" should not be configured in this file

# Re-defines path-mapping of Dubbo Web Endpoints
management.endpoints.web.path-mapping.dubbo-shutdown = dubbo/shutdown
management.endpoints.web.path-mapping.dubbo-configs = dubbo/configs
management.endpoints.web.path-mapping.dubbo-services = dubbo/services
management.endpoints.web.path-mapping.dubbo-references = dubbo/references
management.endpoints.web.path-mapping.dubbo-properties = dubbo/properties
management.endpoints.web.path-mapping.dubboShutdown = dubbo/shutdown
management.endpoints.web.path-mapping.dubboConfigs = dubbo/configs
management.endpoints.web.path-mapping.dubboServices = dubbo/services
management.endpoints.web.path-mapping.dubboReferences = dubbo/references
management.endpoints.web.path-mapping.dubboProperties = dubbo/properties


Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package com.alibaba.boot.dubbo.actuate.endpoint;

import com.alibaba.boot.dubbo.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.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.alibaba.boot.dubbo.actuate.autoconfigure.DubboEndpointsAutoConfiguration;
import com.alibaba.dubbo.config.annotation.Service;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -57,11 +58,11 @@
"dubbo.provider.host=127.0.0.1",
"dubbo.scan.basePackages=com.alibaba.boot.dubbo.actuate.endpoint",
"management.endpoint.dubbo.enabled = true",
"management.endpoint.dubbo-shutdown.enabled = true",
"management.endpoint.dubbo-configs.enabled = true",
"management.endpoint.dubbo-services.enabled = true",
"management.endpoint.dubbo-references.enabled = true",
"management.endpoint.dubbo-properties.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",
})
@EnableAutoConfiguration
public class DubboEndpointsAutoConfigurationTest {
Expand Down Expand Up @@ -143,7 +144,7 @@ public void testServices() {

Assert.assertEquals(1, services.size());

Map<String, Object> demoServiceMeta = services.get("ServiceBean:dubboEndpointsAutoConfigurationTest.DefaultDemoService:com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpointsAutoConfigurationTest$DemoService:${dubbo.service.version}");
Map<String, Object> demoServiceMeta = services.get("ServiceBean:com.alibaba.boot.dubbo.actuate.endpoint.DubboEndpointsAutoConfigurationTest$DemoService:1.0.0");

Assert.assertEquals("1.0.0", demoServiceMeta.get("version"));

Expand Down
2 changes: 1 addition & 1 deletion dubbo-spring-boot-autoconfigure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can introduce the latest `dubbo-spring-boot-autoconfigure` to your project
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>
```

Expand Down
8 changes: 8 additions & 0 deletions dubbo-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<artifactId>spring-boot-autoconfigure</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
Expand All @@ -58,11 +59,18 @@
<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>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
</project>
Loading

0 comments on commit fb2be00

Please sign in to comment.