# Dubbo Spring Boot Production-Ready
`dubbo-spring-boot-actuator` provides production-ready features (e.g. [health checks](#health-checks), [endpoints](#endpoints), and [externalized configuration](#externalized-configuration)).
## Content
1. [Main Content](https://github.com/apache/dubbo-spring-boot-project)
2. [Integrate with Maven](#integrate-with-maven)
3. [Health Checks](#health-checks)
4. [Endpoints](#endpoints)
5. [Externalized Configuration](#externalized-configuration)
## 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>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator</artifactId>
<version>2.7.4.1</version>
</dependency>
```
If your project failed to resolve the dependency, try to add the following repository:
```xml
<repositories>
<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>
</repositories>
```
## Health Checks
`dubbo-spring-boot-actuator` supports the standard Spring Boot `HealthIndicator` as a production-ready feature , which will be aggregated into Spring Boot's `Health` and exported on `HealthEndpoint` that works MVC (Spring Web MVC) and JMX (Java Management Extensions) both if they are available.
### Web Endpoint : `/health`
Suppose a Spring Boot Web application did not specify `management.server.port`, you can access http://localhost:8080/actuator/health via Web Client and will get a response with JSON format is like below :
```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` are Dubbo's build-in `StatusChecker`s in above example.
Dubbo allows the application to extend `StatusChecker`'s SPI.
Default , `memory` and `load` will be added into Dubbo's `HealthIndicator` , it could be overridden by
externalized configuration [`StatusChecker`'s defaults](#statuschecker-defaults).
### JMX Endpoint : `Health`
`Health` is a JMX (Java Management Extensions) Endpoint with ObjectName `org.springframework.boot:type=Endpoint,name=Health` , it can be managed by JMX agent ,e.g. JDK tools : `jconsole` and so on.
![](JMX_HealthEndpoint.png)
### Build-in `StatusChecker`s
`META-INF/dubbo/internal/org.apache.dubbo.common.status.StatusChecker` declares Build-in `StatusChecker`s as follow :
```properties
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
```
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 Actuator Endpoints :
| 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` | `/actuator/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` |
### Web Endpoints
#### `/actuator/dubbo`
`/dubbo` exposes Dubbo's meta data :
```json
{
"timestamp": 1516623290166,
"versions": {
"dubbo-spring-boot": "2.7.5",
"dubbo": "2.7.5"
},
"urls": {
"dubbo": "https://github.com/apache/dubbo/",
"google-group": "dev@dubbo.apache.org",
"github": "https://github.com/apache/dubbo-spring-boot-project",
"issues": "https://github.com/apache/dubbo-spring-boot-project/issues",
"git": "https://github.com/apache/dubbo-spring-boot-project.git"
}
}
```
###
#### `/actuator/dubbo/properties`
`/actuator/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": "org.apache.dubbo.spring.boot.sample.provider.service"
}
```
The structure of JSON is simple Key-Value format , the key is property name as and the value is property value.
#### `/actuator/dubbo/services`
`/actuator/dubbo/services` exposes all Dubbo's `ServiceBean` that are declared via `<dubbo:service/>` or `@Service` present in Spring `ApplicationContext` :
```json
{
"ServiceBean@org.apache.dubbo.spring.boot.sample.api.DemoService#defaultDemoService": {
"accesslog": null,
"actives": null,
"cache": null,
"callbacks": null,
"class": "org.apache.dubbo.config.spring.ServiceBean",
"cluster": null,
"connections": null,
"delay": null,
"document": null,
"executes": null,
"export": null,
"exported": true,
"filter": "",
"generic": "false",
"group": null,
"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,
"local": null,
"merger": null,
"mock": null,
"onconnect": null,
"ondisconnect": null,
"owner": null,
"path": "org.apache.dubbo.spring.boot.sample.api.DemoService",
"proxy": null,
"retries": null,
"scope": null,
"sent": null,
"stub": null,
"timeout": null,
"token": null,
"unexported": false,
"uniqueS
没有合适的资源?快使用搜索试试~ 我知道了~
dubbo-go服务框架dubbo-go-v3.0.14.zip
共2000个文件
java:1774个
xml:147个
properties:50个
需积分: 5 0 下载量 50 浏览量
2024-04-27
09:15:00
上传
评论
收藏 5.55MB ZIP 举报
温馨提示
dubbo-go服务框架是以 Go 语言实现。 工程架构: 基于dubbo的extension模块和分层的代码设计(包括 protocol layer, registry layer, cluster layer, config 等等)。我们的目标是:你可以对这些分层接口进行新的实现,并通过调用 extension 模块的“ extension.SetXXX ”方法来覆盖 dubbo-go [同 go-for-apache-dubbo ]的默认实现,以完成自己的特殊需求而无需修改源代码。
资源推荐
资源详情
资源评论
收起资源包目录
dubbo-go服务框架dubbo-go-v3.0.14.zip (2000个子文件)
说明.htm 4KB
GooglePB.java 144KB
ReferenceConfigTest.java 60KB
ConfigTest.java 48KB
RegistryProtocol.java 43KB
ChannelBuffer.java 43KB
AbstractConfigTest.java 41KB
DefaultApplicationDeployer.java 41KB
MultiInstanceTest.java 40KB
MockClusterInvokerTest.java 37KB
ServiceInstancesChangedListenerTest.java 37KB
ConfigValidationUtils.java 34KB
AbstractChannelBufferTest.java 34KB
ServiceConfig.java 33KB
NacosRegistry.java 30KB
DubboBootstrap.java 29KB
MetadataInfo.java 29KB
DubboBeanDefinitionParser.java 29KB
DubboProtocol.java 29KB
ReferenceConfig.java 28KB
ServiceAnnotationPostProcessor.java 27KB
RegistryDirectory.java 26KB
ReferenceAnnotationBeanPostProcessor.java 26KB
RegistryProtocolTest.java 25KB
ServiceInstancesChangedListener.java 25KB
RpcContext.java 24KB
ConditionStateRouterTest.java 24KB
AbstractClusterInvokerTest.java 23KB
AbstractRegistry.java 23KB
BitListTest.java 23KB
RpcInvocation.java 22KB
AbstractMetadataReport.java 22KB
AbstractRegistryTest.java 22KB
MergeableClusterInvokerTest.java 22KB
TypeUtilsTest.java 22KB
ExchangeCodecTest.java 21KB
ServiceDiscoveryRegistryDirectory.java 21KB
ServiceConfigTest.java 21KB
MethodConfigTest.java 21KB
DubboTelnetDecodeTest.java 21KB
MigrationInvoker.java 21KB
InstanceAddressURL.java 20KB
ExchangeCodec.java 20KB
CuratorZookeeperClient.java 19KB
AbstractMetadataReportTest.java 19KB
HelloRequest.java 19KB
ServiceDiscoveryRegistry.java 19KB
HelloReply.java 19KB
SingleRegistryCenterDubboProtocolIntegrationTest.java 19KB
ReflectionPackableMethod.java 18KB
BitList.java 18KB
NacosMetadataReport.java 18KB
AbstractClusterInvoker.java 18KB
JavaConfigReferenceBeanTest.java 18KB
TripleServerStream.java 18KB
MetricsFilterTest.java 18KB
AbstractAnnotationBeanPostProcessor.java 18KB
RpcUtilsTest.java 18KB
Curator5ZookeeperClient.java 18KB
CallbackServiceCodec.java 18KB
MeshRuleRouterTest.java 17KB
FailbackRegistry.java 17KB
ZookeeperMetadataReportTest.java 16KB
RpcServiceContext.java 16KB
AbstractDirectory.java 16KB
DefaultModuleDeployer.java 16KB
MulticastRegistry.java 16KB
DubboBootstrapTest.java 16KB
MeshAppRuleListenerTest.java 16KB
CacheableFailbackRegistry.java 16KB
ConditionStateRouter.java 15KB
ReferenceAnnotationBeanPostProcessorTest.java 15KB
ResultMergerTest.java 15KB
ZookeeperRegistry.java 15KB
AbstractServiceRestMetadataResolver.java 15KB
JValidatorNew.java 15KB
DeprecatedExchangeCodec.java 15KB
JValidator.java 15KB
TypeUtils.java 15KB
ReferenceKeyTest.java 15KB
MigrationInvokerTest.java 15KB
MeshRuleRouter.java 15KB
MigrationRule.java 15KB
TelnetCodecTest.java 15KB
ArgumentCallbackTest.java 14KB
FailoverClusterInvokerTest.java 14KB
RouterChain.java 14KB
TripleInvoker.java 14KB
MessageFormatter.java 14KB
ImplicitCallBackTest.java 14KB
FilterChainBuilder.java 14KB
TripleClientStream.java 14KB
RestProtocol.java 14KB
GenericFilter.java 14KB
AbstractServerCall.java 14KB
ZKTools.java 14KB
DubboProtocolTest.java 14KB
NacosRegistryTest.java 14KB
InjvmInvoker.java 13KB
DubboNamespaceHandlerTest.java 13KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
稀稀落落987
- 粉丝: 1292
- 资源: 5652
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于SpringBoot+Vue的民族婚纱预定系统的设计与实现(Java毕业设计,附源码,部署教程).zip
- 基于SpringBoot+Vue的民族婚纱预定系统的设计与实现2(Java毕业设计,附源码,部署教程).zip
- 一键清除C盘爆满的插件
- 计算机毕业设计选题参考.xls
- 基于springboot+Vue的码头船只货柜管理系统(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的码头船只货柜管理系统2(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游网站2(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游推荐系统设计与实现(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游推荐系统设计与实现2(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游网站(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游管理系统(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的旅游管理系统2(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的流浪动物救助网站(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的流浪动物管理系统(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的流浪动物管理系统2(Java毕业设计,附源码,部署教程).zip
- 基于springboot+Vue的疗养院管理系统的设计与实现(Java毕业设计,附源码,部署教程).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功