Skip to content

Commit

Permalink
Merge pull request #8279 from alibaba/develop
Browse files Browse the repository at this point in the history
Upgrade to 2.1.0
  • Loading branch information
KomachiSion authored Apr 29, 2022
2 parents 8e9f718 + 2e0eca4 commit b584531
Show file tree
Hide file tree
Showing 487 changed files with 21,598 additions and 3,682 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ matrix:
# On Linux, run with specific JDKs only.
- os: linux
env: CUSTOM_JDK="oraclejdk8"
- name: Linux aarch64
dist: focal
arch: arm64-graviton2
group: edge
virt: vm


jdk:
- openjdk11
Expand Down
26 changes: 26 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ Also, please refer to each LICENSE.<component>.txt file, which is located in
the 'license' directory of the distribution file, for the license terms of the
components that this product depends on.

------
This product has a bundle Spring Framework:
Spring Framework
=================

Please visit the git for more information:

* https:/spring-projects/spring-framework.git

Copyright 2002-2020 the original author or authors.

The Spring Framework 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.

Also, please refer to each LICENSE.<component>.txt file, which is located in
the 'license' directory of the distribution file, for the license terms of the
components that this product depends on.

------
com.alibaba.nacos.common.utils.InetAddressValidator.java in this product is
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ public ResponseEntity<String> postCluster(@RequestParam(required = false) String
* @param product Ip list of products to be associated
* @param cluster Ip list of product cluster to be associated
* @param ips will delete ips.
* @return delete result
* @return delete result (the cluster information is return if success, exception information is return if fail)
*/
@RequestMapping(value = "", method = RequestMethod.DELETE)
public ResponseEntity deleteCluster(@RequestParam(required = false) String product,
public ResponseEntity<String> deleteCluster(@RequestParam(required = false) String product,
@RequestParam(required = false) String cluster, @RequestParam String ips) {
//1. prepare the storage name for product and cluster
String productName = addressServerGeneratorManager.generateProductName(product);
Expand Down
4 changes: 0 additions & 4 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ public class PropertyKeyConst {

public static final String ENDPOINT = "endpoint";

public static final String ENDPOINT_QUERY_PARAMS = "endpointQueryParams";

public static final String ENDPOINT_PORT = "endpointPort";

public static final String SERVER_NAME = "serverName";

public static final String NAMESPACE = "namespace";

public static final String USERNAME = "username";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@

package com.alibaba.nacos.api.config.ability;

import java.io.Serializable;

/**
* config abilities of nacos client.
*
* @author liuzunfei
* @version $Id: ClientConfigAbility.java, v 0.1 2021年01月24日 00:09 AM liuzunfei Exp $
*/
public class ClientConfigAbility {

public class ClientConfigAbility implements Serializable {

private static final long serialVersionUID = 2442741206510725737L;

/**
* support remote metrics get.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* @version $Id: ServerConfigAbility.java, v 0.1 2021年01月24日 00:09 AM liuzunfei Exp $
*/
public class ServerConfigAbility implements Serializable {


private static final long serialVersionUID = -4976152499731684230L;

/**
* support remote metrics get.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public void setMetricsKeys(List<MetricsKey> metricsKeys) {
}

public static class MetricsKey implements Serializable {


private static final long serialVersionUID = -2731160029960311757L;

String type;

String key;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed 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 com.alibaba.nacos.api.exception.runtime;

/**
* Nacos load exception.
*
* @author hujun
*/
public class NacosLoadException extends RuntimeException {

private static final long serialVersionUID = 3513491993982295562L;

public NacosLoadException(String errMsg) {
super(errMsg);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,8 @@

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@

package com.alibaba.nacos.api.naming.ability;

import java.io.Serializable;

/**
* naming abilities of nacos client.
*
* @author liuzunfei
* @version $Id: ClientNamingAbility.java, v 0.1 2021年01月24日 00:09 AM liuzunfei Exp $
*/
public class ClientNamingAbility {

public class ClientNamingAbility implements Serializable {

private static final long serialVersionUID = 7643941846828882862L;

private boolean supportDeltaPush;

private boolean supportRemoteMetric;
Expand Down
26 changes: 26 additions & 0 deletions api/src/main/java/com/alibaba/nacos/api/remote/Payload.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* Licensed 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 com.alibaba.nacos.api.remote;

/**
* payload class sign.
*
* @author hujun
*/
public interface Payload {

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@

package com.alibaba.nacos.api.remote.ability;

import java.io.Serializable;

/**
* remote abilities of nacos client.
*
* @author liuzunfei
* @version $Id: ClientRemoteAbility.java, v 0.1 2021年01月24日 00:09 AM liuzunfei Exp $
*/
public class ClientRemoteAbility {

public class ClientRemoteAbility implements Serializable {

private static final long serialVersionUID = -5794603724540260652L;

/**
* if support remote connection.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* @version $Id: ServerRemoteAbility.java, v 0.1 2021年01月24日 00:09 AM liuzunfei Exp $
*/
public class ServerRemoteAbility implements Serializable {


private static final long serialVersionUID = -3069795759506428390L;

/**
* if support remote connection.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.alibaba.nacos.api.remote.request;

import com.alibaba.nacos.api.remote.Payload;
import java.util.Map;
import java.util.TreeMap;

Expand All @@ -25,7 +26,7 @@
* @author liuzunfei
*/
@SuppressWarnings("PMD.AbstractClassShouldStartWithAbstractNamingRule")
public abstract class Request {
public abstract class Request implements Payload {

private final Map<String, String> headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

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

package com.alibaba.nacos.api.remote.response;

import com.alibaba.nacos.api.remote.Payload;

/**
* abstract response model via rpc channel.
*
* @author liuzunfei
* @version $Id: Response.java, v 0.1 2020年07月13日 6:03 PM liuzunfei Exp $
*/
@SuppressWarnings("PMD.AbstractClassShouldStartWithAbstractNamingRule")
public abstract class Response {
public abstract class Response implements Payload {

int resultCode = ResponseCode.SUCCESS.getCode();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public class NamingUtilsTest {
@Test
public void testGetGroupedNameOptional() {
String onlyGroupName = NamingUtils.getGroupedNameOptional(StringUtils.EMPTY, "groupA");
assertEquals(onlyGroupName, "groupA@@");
assertEquals("groupA@@", onlyGroupName);

String onlyServiceName = NamingUtils.getGroupedNameOptional("serviceA", StringUtils.EMPTY);
assertEquals(onlyServiceName, "@@serviceA");
assertEquals("@@serviceA", onlyServiceName);

String groupNameAndServiceName = NamingUtils.getGroupedNameOptional("serviceA", "groupA");
assertEquals(groupNameAndServiceName, "groupA@@serviceA");
assertEquals("groupA@@serviceA", groupNameAndServiceName);
}
}
19 changes: 4 additions & 15 deletions auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<groupId>${project.groupId}</groupId>
<artifactId>nacos-common</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-auth-plugin</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-sys</artifactId>
Expand All @@ -55,21 +59,6 @@
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit b584531

Please sign in to comment.