update nacos 2.2.0 => 2.2.1
parent
e3aa1eb83f
commit
f822934164
2
pom.xml
2
pom.xml
|
|
@ -17,7 +17,7 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-boot.version>2.7.9</spring-boot.version>
|
<spring-boot.version>2.7.10</spring-boot.version>
|
||||||
<spring-cloud.version>2021.0.6</spring-cloud.version>
|
<spring-cloud.version>2021.0.6</spring-cloud.version>
|
||||||
<spring-boot-admin.version>2.7.10</spring-boot-admin.version>
|
<spring-boot-admin.version>2.7.10</spring-boot-admin.version>
|
||||||
<spring-boot.mybatis>2.2.2</spring-boot.mybatis>
|
<spring-boot.mybatis>2.2.2</spring-boot.mybatis>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version>
|
<spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version>
|
||||||
<sentinel.version>1.8.6</sentinel.version>
|
<sentinel.version>1.8.6</sentinel.version>
|
||||||
<seata.version>1.6.1</seata.version>
|
<seata.version>1.6.1</seata.version>
|
||||||
<nacos.client.version>2.2.0</nacos.client.version>
|
<nacos.client.version>2.2.1</nacos.client.version>
|
||||||
<dubbo.version>3.1.7</dubbo.version>
|
<dubbo.version>3.1.7</dubbo.version>
|
||||||
<spring.context.support.version>1.0.11</spring.context.support.version>
|
<spring.context.support.version>1.0.11</spring.context.support.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<nacos.version>2.2.0</nacos.version>
|
<nacos.version>2.2.1</nacos.version>
|
||||||
<!-- 需要与 Nacos 内置 Boot 版本保持一致 -->
|
<!-- 需要与 Nacos 内置 Boot 版本保持一致 -->
|
||||||
<spring-boot-admin.version>2.6.11</spring-boot-admin.version>
|
<spring-boot-admin.version>2.6.11</spring-boot-admin.version>
|
||||||
<nacos.lib.path>${project.basedir}/src/main/resources/lib</nacos.lib.path>
|
<nacos.lib.path>${project.basedir}/src/main/resources/lib</nacos.lib.path>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,13 @@ import com.alibaba.nacos.console.service.NamespaceOperationService;
|
||||||
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
|
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
|
||||||
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,13 @@ import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
|
||||||
import com.alibaba.nacos.plugin.auth.constant.SignType;
|
import com.alibaba.nacos.plugin.auth.constant.SignType;
|
||||||
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -45,7 +51,7 @@ import java.util.regex.Pattern;
|
||||||
*/
|
*/
|
||||||
@NacosApi
|
@NacosApi
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(path = "/v2/console/namespace")
|
@RequestMapping("/v2/console/namespace")
|
||||||
public class NamespaceControllerV2 {
|
public class NamespaceControllerV2 {
|
||||||
|
|
||||||
private final NamespaceOperationService namespaceOperationService;
|
private final NamespaceOperationService namespaceOperationService;
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
package com.alibaba.nacos.console.exception;
|
package com.alibaba.nacos.console.exception;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.plugin.auth.exception.AccessException;
|
||||||
import com.alibaba.nacos.common.model.RestResultUtils;
|
import com.alibaba.nacos.common.model.RestResultUtils;
|
||||||
import com.alibaba.nacos.common.utils.ExceptionUtil;
|
import com.alibaba.nacos.common.utils.ExceptionUtil;
|
||||||
import com.alibaba.nacos.core.utils.Commons;
|
import com.alibaba.nacos.core.utils.Commons;
|
||||||
import com.alibaba.nacos.plugin.auth.exception.AccessException;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ package com.alibaba.nacos.console.service;
|
||||||
import com.alibaba.nacos.api.exception.NacosException;
|
import com.alibaba.nacos.api.exception.NacosException;
|
||||||
import com.alibaba.nacos.api.exception.api.NacosApiException;
|
import com.alibaba.nacos.api.exception.api.NacosApiException;
|
||||||
import com.alibaba.nacos.api.model.v2.ErrorCode;
|
import com.alibaba.nacos.api.model.v2.ErrorCode;
|
||||||
|
import com.alibaba.nacos.common.utils.NamespaceUtil;
|
||||||
import com.alibaba.nacos.common.utils.StringUtils;
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
import com.alibaba.nacos.config.server.model.TenantInfo;
|
import com.alibaba.nacos.config.server.model.TenantInfo;
|
||||||
import com.alibaba.nacos.config.server.service.repository.CommonPersistService;
|
import com.alibaba.nacos.config.server.service.repository.CommonPersistService;
|
||||||
|
|
@ -70,7 +71,7 @@ public class NamespaceOperationService {
|
||||||
// TODO 获取用kp
|
// TODO 获取用kp
|
||||||
List<TenantInfo> tenantInfos = commonPersistService.findTenantByKp(DEFAULT_KP);
|
List<TenantInfo> tenantInfos = commonPersistService.findTenantByKp(DEFAULT_KP);
|
||||||
|
|
||||||
Namespace namespace0 = new Namespace("", DEFAULT_NAMESPACE, DEFAULT_QUOTA,
|
Namespace namespace0 = new Namespace(NamespaceUtil.getNamespaceDefaultId(), DEFAULT_NAMESPACE, DEFAULT_QUOTA,
|
||||||
configInfoPersistService.configInfoCount(DEFAULT_TENANT), NamespaceTypeEnum.GLOBAL.getType());
|
configInfoPersistService.configInfoCount(DEFAULT_TENANT), NamespaceTypeEnum.GLOBAL.getType());
|
||||||
List<Namespace> namespaceList = new ArrayList<>();
|
List<Namespace> namespaceList = new ArrayList<>();
|
||||||
namespaceList.add(namespace0);
|
namespaceList.add(namespace0);
|
||||||
|
|
@ -92,7 +93,7 @@ public class NamespaceOperationService {
|
||||||
*/
|
*/
|
||||||
public NamespaceAllInfo getNamespace(String namespaceId) throws NacosException {
|
public NamespaceAllInfo getNamespace(String namespaceId) throws NacosException {
|
||||||
// TODO 获取用kp
|
// TODO 获取用kp
|
||||||
if (StringUtils.isBlank(namespaceId)) {
|
if (StringUtils.isBlank(namespaceId) || namespaceId.equals(NamespaceUtil.getNamespaceDefaultId())) {
|
||||||
return new NamespaceAllInfo(namespaceId, DEFAULT_NAMESPACE_SHOW_NAME, DEFAULT_QUOTA,
|
return new NamespaceAllInfo(namespaceId, DEFAULT_NAMESPACE_SHOW_NAME, DEFAULT_QUOTA,
|
||||||
configInfoPersistService.configInfoCount(DEFAULT_TENANT), NamespaceTypeEnum.GLOBAL.getType(),
|
configInfoPersistService.configInfoCount(DEFAULT_TENANT), NamespaceTypeEnum.GLOBAL.getType(),
|
||||||
DEFAULT_NAMESPACE_DESCRIPTION);
|
DEFAULT_NAMESPACE_DESCRIPTION);
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,6 @@ db.num=1
|
||||||
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
db.user.0=root
|
db.user.0=root
|
||||||
db.password.0=root
|
db.password.0=root
|
||||||
db.pool.config.connectionTimeout=30000
|
|
||||||
db.pool.config.validationTimeout=10000
|
|
||||||
db.pool.config.maximumPoolSize=20
|
|
||||||
db.pool.config.minimumIdle=2
|
|
||||||
|
|
||||||
#*************** Naming Module Related Configurations ***************#
|
#*************** Naming Module Related Configurations ***************#
|
||||||
### Data dispatch task execution period in milliseconds:
|
### Data dispatch task execution period in milliseconds:
|
||||||
|
|
@ -125,13 +121,17 @@ nacos.core.auth.enable.userAgentAuthWhite=false
|
||||||
|
|
||||||
### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
|
### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
|
||||||
### The two properties is the white list for auth and used by identity the request from other server.
|
### The two properties is the white list for auth and used by identity the request from other server.
|
||||||
|
### 此处为用户名密码 需要自行修改
|
||||||
nacos.core.auth.server.identity.key=serverIdentity
|
nacos.core.auth.server.identity.key=serverIdentity
|
||||||
nacos.core.auth.server.identity.value=security
|
nacos.core.auth.server.identity.value=security
|
||||||
|
|
||||||
### worked when nacos.core.auth.system.type=nacos
|
### worked when nacos.core.auth.system.type=nacos
|
||||||
### The token expiration in seconds:
|
### The token expiration in seconds:
|
||||||
|
nacos.core.auth.plugin.nacos.token.cache.enable=false
|
||||||
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
|
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
|
||||||
### The default token:
|
### The default token (Base64 string):
|
||||||
|
#nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
|
### 此处为token密钥 需要自行修改
|
||||||
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
|
|
||||||
### worked when nacos.core.auth.system.type=ldap,{0} is Placeholder,replace login username
|
### worked when nacos.core.auth.system.type=ldap,{0} is Placeholder,replace login username
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -35,7 +35,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
|
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
|
||||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
|
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
|
||||||
<!-- 第三方css结束 -->
|
<!-- 第三方css结束 -->
|
||||||
<link href="./css/main.css?c18229e4d79449526734" rel="stylesheet"></head>
|
<link href="./css/main.css?9f68bc0e1a07ae7085fe" rel="stylesheet"></head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root" style="overflow:hidden"></div>
|
<div id="root" style="overflow:hidden"></div>
|
||||||
|
|
@ -56,6 +56,6 @@
|
||||||
<script src="console-ui/public/js/merge.js"></script>
|
<script src="console-ui/public/js/merge.js"></script>
|
||||||
<script src="console-ui/public/js/loader.js"></script>
|
<script src="console-ui/public/js/loader.js"></script>
|
||||||
<!-- 第三方js结束 -->
|
<!-- 第三方js结束 -->
|
||||||
<script type="text/javascript" src="./js/main.js?c18229e4d79449526734"></script></body>
|
<script type="text/javascript" src="./js/main.js?9f68bc0e1a07ae7085fe"></script></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue