1.下載下傳
Dubbo 管理控制台的下載下傳位址為:https://github.com/apache/incubator-dubbo-ops
2.配置
在下載下傳的 zip 檔案的解壓目錄的 dubbo-admin-server\src\main\resources 下,
修改配置文
件 application.properties。
主要就是修改注冊中心、配置中心,與中繼資料中心的 zk 位址
這是一個 springboot 工程,預設端口号為8080,若要修改端口号,則在配置檔案中增加
server.port=8888
# centers in dubbo2.7
admin.registry.address=zookeeper://127.0.0.1:2181
admin.config-center=zookeeper://127.0.0.1:2181
admin.metadata-report.address=zookeeper://127.0.0.1:2181
#group
admin.registry.group=dubbo
admin.config-center.group=dubbo
admin.metadata-report.group=dubbo
admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
admin.apollo.appId=test
admin.apollo.env=dev
admin.apollo.cluster=default
admin.apollo.namespace=dubbo
server.port=8888
3.配置前端工程
修改\dubbo-admin-develop\dubbo-admin-ui\config\index.js
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/': {
//後端服務位址
target: 'http://localhost:8080/',
changeOrigin: true,
pathRewrite: {
'^/': '/'
}
}
},
//前端項目位址端口
host: 'localhost', // can be overwritten by process.env.HOST
port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
建構前端工程
npm install
啟動前端工程,然後就應該可以通路頁面了 http://localhost:8081
npm run dev
4.配置後端工程
修改 dubbo-admin-server/src/main/resources/application.properties
https://blog.csdn.net/weixin_41154636/article/details/96478016
# centers in dubbo2.7
admin.registry.address=zookeeper://localhost:2181
admin.config-center=zookeeper://localhost:2181
admin.metadata-report.address=zookeeper://localhost:2181
server.port=8080
進入到dubbo-admin-server目錄下,建構項目
mvn clean package
啟動運作
mvn --projects dubbo-admin-server spring-boot:run
然後你再次通路前端頁面,就可以監視到通過dubbo注冊在zookeeper的服務了。