diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000000000..7ed913a9f
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,6 @@
+github:
+ protected_branches:
+ master:
+ foo: bar
+ master-0.2.0:
+ foo: bar
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index cf58f0a9d..6367c40de 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache Dubbo Admin
-Copyright 2018-2019 The Apache Software Foundation
+Copyright 2018-2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 37be75b66..e0182457b 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
### Quick start
* prebuilt docker image https://hub.docker.com/r/apache/dubbo-admin
-* quick start a live demo with [play-with-docker](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/apache/dubbo-admin/develop/docker/stack.yml#) (version:0.1.0)
+* quick start a live demo with [play-with-docker](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/apache/dubbo-admin/develop/docker/stack.yml#) (version:0.3.0)
### Screenshot
diff --git a/README_ZH.md b/README_ZH.md
index f4f0d909d..c1a21d10f 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -8,7 +8,7 @@
### 快速开始
* 预构建的Docker镜像 https://hub.docker.com/r/apache/dubbo-admin
-* 快速启动一个演示环境 [play-with-docker](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/apache/dubbo-admin/develop/docker/stack.yml#) (版本:0.1.0)
+* 快速启动一个演示环境 [play-with-docker](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/apache/dubbo-admin/develop/docker/stack.yml#) (版本:0.3.0)
### 页面截图
diff --git a/docker/0.3.0/Dockerfile b/docker/0.3.0/Dockerfile
index 5432d3dde..ac31116d3 100644
--- a/docker/0.3.0/Dockerfile
+++ b/docker/0.3.0/Dockerfile
@@ -14,16 +14,15 @@
# limitations under the License.
FROM maven:3-openjdk-8
-RUN mkdir -p /source/dubbo-admin-snapshot
-ADD . /source/dubbo-admin-snapshot
-WORKDIR /source/dubbo-admin-snapshot
-RUN mvn --batch-mode -Prelease clean package -Dmaven.test.skip=true
+RUN mkdir /source && wget https://github.com/apache/dubbo-admin/archive/0.3.0.zip && unzip -q 0.3.0.zip -d /source
+WORKDIR /source/dubbo-admin-0.3.0
+RUN mvn --batch-mode clean package -Dmaven.test.skip=true
FROM openjdk:8-jre
LABEL maintainer="dev@dubbo.apache.org"
RUN apt-get update && apt-get install -y tini
-COPY --from=0 /source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0.jar /app.jar
-COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
+COPY --from=0 /source/dubbo-admin-0.3.0/dubbo-admin-distribution/target/dubbo-admin-0.3.0.jar /app.jar
+COPY --from=0 /source/dubbo-admin-0.3.0/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
ENV JAVA_OPTS ""
diff --git a/docker/0.3.0/Dockerfile.test b/docker/0.3.0/Dockerfile.test
new file mode 100644
index 000000000..dee4d1d35
--- /dev/null
+++ b/docker/0.3.0/Dockerfile.test
@@ -0,0 +1,23 @@
+# 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.
+
+FROM ubuntu:trusty
+RUN apt-get update && apt-get install -yq curl && apt-get clean
+
+WORKDIR /app
+
+ADD test.sh /app/test.sh
+
+CMD ["bash", "test.sh"]
\ No newline at end of file
diff --git a/docker/0.3.0/docker-compose.test.yml b/docker/0.3.0/docker-compose.test.yml
new file mode 100644
index 000000000..9ac7fec20
--- /dev/null
+++ b/docker/0.3.0/docker-compose.test.yml
@@ -0,0 +1,33 @@
+# 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.
+
+zookeeper:
+ image: zookeeper:3.5
+admin:
+ build: .
+ dockerfile: Dockerfile
+ links:
+ - zookeeper
+ environment:
+ - admin.registry.address=zookeeper://zookeeper:2181
+ - admin.config-center=zookeeper://zookeeper:2181
+ - admin.metadata-report.address=zookeeper://zookeeper:2181
+ ports:
+ - 8080
+sut:
+ build: .
+ dockerfile: Dockerfile.test
+ links:
+ - admin
\ No newline at end of file
diff --git a/docker/0.3.0/test.sh b/docker/0.3.0/test.sh
new file mode 100755
index 000000000..d342e3550
--- /dev/null
+++ b/docker/0.3.0/test.sh
@@ -0,0 +1,34 @@
+# 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.
+
+LOOP_SIZE=60
+i=0
+
+while [[ $i -lt LOOP_SIZE ]]; do
+ status_code=$(curl --write-out %{http_code} --silent --output /dev/null http://admin:8080)
+
+ if [[ "$status_code" -eq 200 ]] ; then
+ echo "Tests passed!"
+ exit 0
+ else
+ curl -v http://admin:8080
+ echo "status is incorrect, waiting for next turn"
+ fi
+ sleep 5
+ i=$i+1
+done
+
+echo "Tests failed!"
+exit 1
\ No newline at end of file
diff --git a/docker/latest/Dockerfile b/docker/latest/Dockerfile
index 5ce8b3e71..a4e4f756f 100644
--- a/docker/latest/Dockerfile
+++ b/docker/latest/Dockerfile
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y tini
COPY --from=0 /source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0-SNAPSHOT.jar /app.jar
COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
-ENV JAVA_OPTS ""
+ENV JAVA_OPTS "-Dloader.path=/opt-libs"
ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]
EXPOSE 8080
diff --git a/docker/stack.yml b/docker/stack.yml
index ebb35f237..0392bc1a2 100644
--- a/docker/stack.yml
+++ b/docker/stack.yml
@@ -26,7 +26,20 @@ services:
- zookeeper
ports:
- 8080:8080
+# the db driver path
+ volumes:
+ - "/mnt/opt-libs:/opt-libs"
environment:
- admin.registry.address=zookeeper://zookeeper:2181
- admin.config-center=zookeeper://zookeeper:2181
- - admin.metadata-report.address=zookeeper://zookeeper:2181
\ No newline at end of file
+ - admin.metadata-report.address=zookeeper://zookeeper:2181
+ - dubbo.application.name=dubbo-admin
+ - dubbo.registry.address=zookeeper://zookeeper:2181
+ - mybatis-plus.global-config.db-config.id-type=none
+ - spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+ - spring.datasource.url=jdbc:mysql://xxx:3306/dubbo-admin?characterEncoding=utf8&connectTimeout=1000&socketTimeout=10000&autoReconnect=true
+ - spring.datasource.username=root
+ - spring.datasource.password=mysql
+# use internal h2 as database
+# - spring.datasource.url=jdbc:h2:mem:~/dubbo-admin;
+# - spring.datasource.username=sa
\ No newline at end of file
diff --git a/dubbo-admin-distribution/src/NOTICE b/dubbo-admin-distribution/src/NOTICE
index 446a88f30..df92423ec 100644
--- a/dubbo-admin-distribution/src/NOTICE
+++ b/dubbo-admin-distribution/src/NOTICE
@@ -1,5 +1,5 @@
Apache Dubbo Admin
-Copyright 2018-2019 The Apache Software Foundation
+Copyright 2018-2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -100,7 +100,7 @@ dubbo NOTICE
========================================================================
Apache Dubbo
-Copyright 2018-2019 The Apache Software Foundation
+Copyright 2018-2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/dubbo-admin-distribution/src/assembly/source-release.xml b/dubbo-admin-distribution/src/assembly/source-release.xml
index 9c83c749e..f1316bf6d 100644
--- a/dubbo-admin-distribution/src/assembly/source-release.xml
+++ b/dubbo-admin-distribution/src/assembly/source-release.xml
@@ -59,6 +59,7 @@
**/.mvn/****/*.jar**/mvnw*
+ **/.flattened-pom.xmldubbo-admin-distribution/src/LICENSEdubbo-admin-distribution/src/NOTICEdubbo-admin-distribution/src/licenses/**
diff --git a/dubbo-admin-distribution/src/bin/config/application.properties b/dubbo-admin-distribution/src/bin/config/application.properties
index df1746801..dbbc16cd4 100644
--- a/dubbo-admin-distribution/src/bin/config/application.properties
+++ b/dubbo-admin-distribution/src/bin/config/application.properties
@@ -56,3 +56,21 @@ admin.check.sessionTimeoutMilli=3600000
server.compression.enabled=true
server.compression.mime-types=text/css,text/javascript,application/javascript
server.compression.min-response-size=10240
+
+#dubbo config
+dubbo.application.name=dubbo-admin
+dubbo.registry.address=${admin.registry.address}
+
+# mysql
+#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3306/dubbo-admin?characterEncoding=utf8&connectTimeout=1000&socketTimeout=10000&autoReconnect=true
+#spring.datasource.username=root
+#spring.datasource.password=mysql
+
+# h2
+spring.datasource.url=jdbc:h2:mem:~/dubbo-admin;
+spring.datasource.username=sa
+spring.datasource.password=
+
+# id generate type
+mybatis-plus.global-config.db-config.id-type=none
\ No newline at end of file
diff --git a/dubbo-admin-distribution/src/bin/startup.cmd b/dubbo-admin-distribution/src/bin/startup.cmd
index 67af6603a..5a78317b9 100644
--- a/dubbo-admin-distribution/src/bin/startup.cmd
+++ b/dubbo-admin-distribution/src/bin/startup.cmd
@@ -26,6 +26,6 @@ set SERVER=dubbo-admin
set "JAVA_OPT=%JAVA_OPT% -Xms512m -Xmx512m -Xmn256m"
-set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\lib\%SERVER%.jar"
+set "JAVA_OPT=%JAVA_OPT% -Dloader.path=%BASE_DIR%\opt-libs -jar %BASE_DIR%\lib\%SERVER%.jar"
call "%JAVA%" %JAVA_OPT% dubbo.admin %*
diff --git a/dubbo-admin-distribution/src/bin/startup.sh b/dubbo-admin-distribution/src/bin/startup.sh
index 765f81437..3bb5e7276 100644
--- a/dubbo-admin-distribution/src/bin/startup.sh
+++ b/dubbo-admin-distribution/src/bin/startup.sh
@@ -63,6 +63,6 @@ if [ ! -f "${BASE_DIR}/logs/start.out" ]; then
fi
JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
-JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/lib/${SERVER}.jar"
-nohup $JAVA ${JAVA_OPT} dubbo.admin >> ${BASE_DIR}/logs/catlog.out 2>&1 &
+JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/opt-libs -jar ${BASE_DIR}/lib/${SERVER}.jar"
+nohup "$JAVA" ${JAVA_OPT} dubbo.admin >> ${BASE_DIR}/logs/catlog.out 2>&1 &
echo "${SERVER} is starting,you can check the ${BASE_DIR}/logs/catlog.out"
\ No newline at end of file
diff --git a/dubbo-admin-server/pom.xml b/dubbo-admin-server/pom.xml
index d03d5ab54..73be90fff 100644
--- a/dubbo-admin-server/pom.xml
+++ b/dubbo-admin-server/pom.xml
@@ -33,6 +33,8 @@
UTF-81.82.23.4
+ 3.4.1
+ 0.6.0
@@ -128,6 +130,11 @@
org.apache.curatorcurator-recipes
+
+ org.apache.curator
+ curator-x-discovery
+
+
com.alibabafastjson
@@ -172,11 +179,6 @@
netty-all
-
- org.apache.dubbo
- dubbo-serialization-kryo
-
-
org.mockitomockito-core
@@ -189,6 +191,43 @@
zookeeper
+
+
+ com.auth0
+ java-jwt
+ ${jwt-version}
+
+
+
+ io.jsonwebtoken
+ jjwt
+ ${jjwt-version}
+
+
+
+
+ org.apache.dubbo.extensions
+ dubbo-mock-api
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+
+
+
+
+
+
+
+
+
+ com.h2database
+ h2
+ runtime
+
@@ -197,6 +236,9 @@
org.springframework.bootspring-boot-maven-plugin2.0.2.RELEASE
+
+ ZIP
+ package
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/DubboAdminApplication.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/DubboAdminApplication.java
index 4f73eae9b..0be95b437 100644
--- a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/DubboAdminApplication.java
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/DubboAdminApplication.java
@@ -17,14 +17,17 @@
package org.apache.dubbo.admin;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
@SpringBootApplication(exclude={
- DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class
+ HibernateJpaAutoConfiguration.class
})
+@EnableDubbo(scanBasePackages = {"org.apache.dubbo.admin.provider"})
+@MapperScan(basePackages = {"org.apache.dubbo.admin.mapper"})
public class DubboAdminApplication {
public static void main(String[] args) {
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/InterceptorAuthentication.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/InterceptorAuthentication.java
new file mode 100644
index 000000000..bb468c074
--- /dev/null
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/InterceptorAuthentication.java
@@ -0,0 +1,34 @@
+/*
+ * 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.admin.authentication;
+
+import org.apache.dubbo.common.extension.SPI;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Permission interception validation
+ *
+ */
+@SPI
+public interface InterceptorAuthentication {
+
+ boolean authentication(HttpServletRequest request, HttpServletResponse response, Object handler);
+
+}
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/LoginAuthentication.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/LoginAuthentication.java
new file mode 100644
index 000000000..c9445e604
--- /dev/null
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/LoginAuthentication.java
@@ -0,0 +1,33 @@
+/*
+ * 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.admin.authentication;
+
+import org.apache.dubbo.common.extension.SPI;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Logon permission authentication
+ *
+ */
+@SPI
+public interface LoginAuthentication {
+
+ boolean authentication(HttpServletRequest request, String userName, String password);
+
+}
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/impl/DefaultPreHandle.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/impl/DefaultPreHandle.java
new file mode 100644
index 000000000..d66fd1f9e
--- /dev/null
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/authentication/impl/DefaultPreHandle.java
@@ -0,0 +1,66 @@
+/*
+ * 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.admin.authentication.impl;
+
+import org.apache.dubbo.admin.annotation.Authority;
+import org.apache.dubbo.admin.authentication.InterceptorAuthentication;
+import org.apache.dubbo.admin.interceptor.AuthInterceptor;
+import org.apache.dubbo.admin.utils.JwtTokenUtil;
+import org.apache.dubbo.admin.utils.SpringBeanUtils;
+
+import org.springframework.util.StringUtils;
+import org.springframework.web.method.HandlerMethod;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Method;
+
+public class DefaultPreHandle implements InterceptorAuthentication {
+
+ private JwtTokenUtil jwtTokenUtil = SpringBeanUtils.getBean(JwtTokenUtil.class);
+
+ @Override
+ public boolean authentication(HttpServletRequest request, HttpServletResponse response, Object handler) {
+ HandlerMethod handlerMethod = (HandlerMethod) handler;
+ Method method = handlerMethod.getMethod();
+ Authority authority = method.getDeclaredAnnotation(Authority.class);
+ if (null == authority) {
+ authority = method.getDeclaringClass().getDeclaredAnnotation(Authority.class);
+ }
+
+ String token = request.getHeader("Authorization");
+
+ if (null != authority && authority.needLogin()) {
+ //check if 'authorization' is empty to prevent NullPointException
+ if (StringUtils.isEmpty(token)) {
+ //While authentication is required and 'Authorization' string is missing in the request headers,
+ //reject this request(http403).
+ AuthInterceptor.authRejectedResponse(response);
+ return false;
+ }
+ if (jwtTokenUtil.canTokenBeExpiration(token)) {
+ return true;
+ }
+ //while user not found, or token timeout, reject this request(http401).
+ AuthInterceptor.loginFailResponse(response);
+ return false;
+ } else {
+ return true;
+ }
+ }
+}
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/Constants.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/Constants.java
index f98a0d91a..0116da57d 100644
--- a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/Constants.java
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/Constants.java
@@ -26,6 +26,7 @@ public class Constants {
public static final String REGISTRY_ADDRESS = "dubbo.registry.address";
public static final String METADATA_ADDRESS = "dubbo.metadata-report.address";
public static final String DEFAULT_ROOT = "dubbo";
+ public static final String DEFAULT_GROUP = "dubbo";
public static final String PATH_SEPARATOR = "/";
public static final String GROUP_KEY = "group";
public static final String NAMESPACE_KEY = "namespace";
@@ -74,12 +75,13 @@ public class Constants {
public static final String CONSUMERS_CATEGORY = "consumers";
public static final String SPECIFICATION_VERSION_KEY = "release";
public static final String GLOBAL_CONFIG = "global";
- public static final String GLOBAL_CONFIG_PATH = "config/dubbo/dubbo.properties";
+ public static final String GLOBAL_CONFIG_PATH = "dubbo.properties";
public static final String METRICS_PORT = "metrics.port";
public static final String METRICS_PROTOCOL = "metrics.protocol";
public static final Set CONFIGS = new HashSet<>();
public static final String COLON = ":";
-
+ public static final String MESH_RULE_SUFFIX = ".MESHAPPRULE";
+ public static final String DEFAULT_MAPPING_GROUP = "mapping";
static {
CONFIGS.add(WEIGHT);
CONFIGS.add(BALANCING);
diff --git a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/ServiceTestUtil.java b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/ServiceTestUtil.java
index fa568ff6c..5ab5087e0 100644
--- a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/ServiceTestUtil.java
+++ b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/ServiceTestUtil.java
@@ -19,10 +19,10 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.dubbo.admin.model.domain.MethodMetadata;
-import org.apache.dubbo.metadata.definition.model.FullServiceDefinition;
-import org.apache.dubbo.metadata.definition.model.MethodDefinition;
-import org.apache.dubbo.metadata.definition.model.ServiceDefinition;
-import org.apache.dubbo.metadata.definition.model.TypeDefinition;
+import org.apache.dubbo.admin.model.domain.FullServiceDefinition;
+import org.apache.dubbo.admin.model.domain.MethodDefinition;
+import org.apache.dubbo.admin.model.domain.ServiceDefinition;
+import org.apache.dubbo.admin.model.domain.TypeDefinition;
import java.util.ArrayList;
import java.util.Collections;
@@ -86,7 +86,7 @@ private static List