Skip to content

Commit 0e6d097

Browse files
committed
✨ Nacos v2.5.0
1 parent 5e69891 commit 0e6d097

File tree

15 files changed

+167
-611
lines changed

15 files changed

+167
-611
lines changed

data/sql/base/twelvet_nacos.sql

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,37 @@ CREATE TABLE `config_info_beta`
215215
-- Records of config_info_beta
216216
-- ----------------------------
217217

218+
-- ----------------------------
219+
-- Table structure for config_info_gray
220+
-- ----------------------------
221+
DROP TABLE IF EXISTS `config_info_gray`;
222+
CREATE TABLE `config_info_gray`
223+
(
224+
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
225+
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
226+
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
227+
`content` longtext NOT NULL COMMENT 'content',
228+
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
229+
`src_user` text COMMENT 'src_user',
230+
`src_ip` varchar(100) DEFAULT NULL COMMENT 'src_ip',
231+
`gmt_create` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'gmt_create',
232+
`gmt_modified` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'gmt_modified',
233+
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
234+
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
235+
`gray_name` varchar(128) NOT NULL COMMENT 'gray_name',
236+
`gray_rule` text NOT NULL COMMENT 'gray_rule',
237+
`encrypted_data_key` varchar(256) NOT NULL DEFAULT '' COMMENT 'encrypted_data_key',
238+
PRIMARY KEY (`id`),
239+
UNIQUE KEY `uk_configinfogray_datagrouptenantgray` (`data_id`, `group_id`, `tenant_id`, `gray_name`),
240+
KEY `idx_dataid_gmt_modified` (`data_id`, `gmt_modified`),
241+
KEY `idx_gmt_modified` (`gmt_modified`)
242+
) ENGINE = InnoDB
243+
DEFAULT CHARSET = utf8 COMMENT ='config_info_gray';
244+
245+
-- ----------------------------
246+
-- Records of config_info_gray
247+
-- ----------------------------
248+
218249
-- ----------------------------
219250
-- Table structure for config_info_tag
220251
-- ----------------------------

twelvet-nacos/pom.xml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,71 +14,84 @@
1414
<description>nacos 注册配置中心</description>
1515

1616
<properties>
17-
<nacos.version>2.3.2-OEM</nacos.version>
18-
<spring-boot-dependencies.version>2.7.18</spring-boot-dependencies.version>
19-
<spring-cloud.version>2021.0.9</spring-cloud.version>
17+
<nacos.version>2.5.0</nacos.version>
18+
<tomcat.version>9.0.98</tomcat.version>
19+
<spring-boot.version>2.7.18</spring-boot.version>
2020
<spring-boot-admin.version>2.7.16</spring-boot-admin.version>
2121
</properties>
2222

2323
<!--依赖版本声明-->
2424
<dependencyManagement>
2525
<dependencies>
26-
2726
<!-- SpringBoot 依赖配置 -->
2827
<dependency>
2928
<groupId>org.springframework.boot</groupId>
3029
<artifactId>spring-boot-dependencies</artifactId>
31-
<version>${spring-boot-dependencies.version}</version>
30+
<version>${spring-boot.version}</version>
3231
<type>pom</type>
3332
<scope>import</scope>
3433
</dependency>
3534

36-
<!-- SpringCloud 微服务 -->
37-
<dependency>
38-
<groupId>org.springframework.cloud</groupId>
39-
<artifactId>spring-cloud-dependencies</artifactId>
40-
<version>${spring-cloud.version}</version>
41-
<type>pom</type>
42-
<scope>import</scope>
43-
</dependency>
44-
45-
<!-- SpringBoot Admin -->
4635
<dependency>
4736
<groupId>de.codecentric</groupId>
4837
<artifactId>spring-boot-admin-starter-client</artifactId>
4938
<version>${spring-boot-admin.version}</version>
5039
</dependency>
5140

41+
<!-- 覆盖nacos tomcat version 避免CVE-2024-24549-->
42+
<dependency>
43+
<groupId>org.apache.tomcat.embed</groupId>
44+
<artifactId>tomcat-embed-websocket</artifactId>
45+
<version>${tomcat.version}</version>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>org.apache.tomcat.embed</groupId>
50+
<artifactId>tomcat-embed-core</artifactId>
51+
<version>${tomcat.version}</version>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.apache.tomcat.embed</groupId>
56+
<artifactId>tomcat-embed-el</artifactId>
57+
<version>${tomcat.version}</version>
58+
</dependency>
59+
60+
<dependency>
61+
<groupId>org.apache.tomcat</groupId>
62+
<artifactId>tomcat-annotations-api</artifactId>
63+
<version>${tomcat.version}</version>
64+
</dependency>
5265
</dependencies>
5366
</dependencyManagement>
5467

5568
<dependencies>
5669
<dependency>
57-
<groupId>group.springframework.nacos</groupId>
70+
<groupId>io.github.pig-mesh.nacos</groupId>
5871
<artifactId>nacos-config</artifactId>
5972
<version>${nacos.version}</version>
6073
</dependency>
6174

6275
<dependency>
63-
<groupId>group.springframework.nacos</groupId>
76+
<groupId>io.github.pig-mesh.nacos</groupId>
6477
<artifactId>nacos-naming</artifactId>
6578
<version>${nacos.version}</version>
6679
</dependency>
6780

6881
<dependency>
69-
<groupId>group.springframework.nacos</groupId>
82+
<groupId>io.github.pig-mesh.nacos</groupId>
7083
<artifactId>nacos-istio</artifactId>
7184
<version>${nacos.version}</version>
7285
</dependency>
7386

7487
<dependency>
75-
<groupId>group.springframework.nacos</groupId>
88+
<groupId>io.github.pig-mesh.nacos</groupId>
7689
<artifactId>nacos-default-plugin-all</artifactId>
7790
<version>${nacos.version}</version>
7891
</dependency>
7992

8093
<dependency>
81-
<groupId>group.springframework.nacos</groupId>
94+
<groupId>io.github.pig-mesh.nacos</groupId>
8295
<artifactId>nacos-prometheus</artifactId>
8396
<version>${nacos.version}</version>
8497
</dependency>
@@ -94,6 +107,7 @@
94107
</dependency>
95108

96109
</dependencies>
110+
97111
<build>
98112
<plugins>
99113
<plugin>

twelvet-nacos/src/main/java/com/alibaba/nacos/NacosApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.alibaba.nacos;
22

3-
import com.alibaba.nacos.config.ConfigConstants;
3+
import com.alibaba.nacos.console.config.ConfigConstants;
44
import org.slf4j.Logger;
55
import org.slf4j.LoggerFactory;
66
import org.springframework.boot.SpringApplication;

twelvet-nacos/src/main/java/com/alibaba/nacos/config/ConfigConstants.java

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2018-2025, lengleng All rights reserved.
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions are met:
6+
*
7+
* Redistributions of source code must retain the above copyright notice,
8+
* this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
* notice, this list of conditions and the following disclaimer in the
11+
* documentation and/or other materials provided with the distribution.
12+
* Neither the name of the pig4cloud.com developer nor the names of its
13+
* contributors may be used to endorse or promote products derived from
14+
* this software without specific prior written permission.
15+
* Author: lengleng ([email protected])
16+
*/
17+
18+
package com.alibaba.nacos.console.config;
19+
20+
/**
21+
* @author lengleng
22+
* @date 2019-10-31
23+
* <p>
24+
* 覆盖nacos 默认配置
25+
*/
26+
public interface ConfigConstants {
27+
28+
/**
29+
* The System property name of Standalone mode
30+
*/
31+
String STANDALONE_MODE = "nacos.standalone";
32+
33+
/**
34+
* 是否开启认证
35+
*/
36+
String AUTH_ENABLED = "nacos.core.auth.enabled";
37+
38+
/**
39+
* 日志目录
40+
*/
41+
String LOG_BASEDIR = "server.tomcat.basedir";
42+
43+
/**
44+
* access_log日志开关
45+
*/
46+
String LOG_ENABLED = "server.tomcat.accesslog.enabled";
47+
48+
/**
49+
* 路径 nacos context path
50+
*/
51+
String NACOS_CONTEXT_PATH = "server.servlet.contextPath";
52+
53+
}

twelvet-nacos/src/main/java/com/alibaba/nacos/config/ConsoleConfig.java renamed to twelvet-nacos/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.alibaba.nacos.config;
17+
package com.alibaba.nacos.console.config;
1818

1919
import com.alibaba.nacos.console.filter.XssFilter;
2020
import com.alibaba.nacos.core.code.ControllerMethodsCache;

twelvet-nacos/src/main/java/com/alibaba/nacos/console/config/ConsoleModuleStateBuilder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.alibaba.nacos.console.config;
1818

19-
import com.alibaba.nacos.config.ConsoleConfig;
2019
import com.alibaba.nacos.sys.module.ModuleState;
2120
import com.alibaba.nacos.sys.module.ModuleStateBuilder;
2221
import com.alibaba.nacos.sys.utils.ApplicationUtils;

twelvet-nacos/src/main/resources/META-INF/nacos-default.properties

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)