升级nacos 升级到 3.2.2

This commit is contained in:
JEECG 2026-07-07 13:42:37 +08:00
parent dd5cdeca6f
commit a78496338d
18 changed files with 766 additions and 3736 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ spring:
allow-circular-references: true
config:
import:
- optional:nacos:${spring.application.name}-@profile.name@.yaml
- optional:nacos:${spring.application.name}.yaml
cloud:
nacos:
config:

View File

@ -0,0 +1,193 @@
################ Sa-Token 配置 (文档: https://sa-token.cc) ################
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: X-Access-Token
# token 有效期(单位:秒) 默认30天-1 代表永久有效
timeout: 2592000
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: -1
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: false
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token
is-share: false
# token 风格使用jwt-simple保持与原JWT token格式一致
token-style: jwt-simple
# 是否输出操作日志
is-log: false
# 是否从 cookie 中读取 token
is-read-cookie: false
# 是否从 head 中读取 token
is-read-header: true
# 是否从请求体URL参数里读取 token
is-read-body: true
# jwt秘钥重要请修改为你自己的秘钥确保足够复杂
jwt-secret-key: "dd05f1c54d63749eda95f9fa6d49v442a"
spring:
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
allow:
web-stat-filter:
enabled: true
dynamic:
druid:
initial-size: 5
min-idle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat,slf4j
wall:
selectWhereAlwayTrueCheck: false
stat:
merge-sql: true
slow-sql-millis: 5000
datasource:
master:
url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# sharding-db:
# driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
# url: jdbc:shardingsphere:nacos:sharding.yaml?serverAddr=${spring.cloud.nacos.config.server-addr}&namespace=${spring.cloud.nacos.config.namespace}&group=${spring.cloud.nacos.config.group}
data:
redis:
database: 0
host: jeecg-boot-redis
password:
port: 6379
rabbitmq:
host: jeecg-boot-rabbitmq
username: guest
password: guest
port: 5672
publisher-confirms: true
publisher-returns: true
virtual-host: /
listener:
simple:
acknowledge-mode: manual
concurrency: 1
max-concurrency: 1
retry:
enabled: true
flyway:
enabled: false
locations: classpath:flyway/sql/mysql
clean-disabled: true
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
firewall:
dataSourceSafe: false
lowCodeMode: dev
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
uploadType: local
domainUrl:
pc: http://localhost:3100
app: http://localhost:8051
path:
upload: /opt/upFiles
webapp: /opt/webapp
shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
oss:
endpoint: oss-cn-beijing.aliyuncs.com
accessKey: ??
secretKey: ??
bucketName: jeecgdev
staticDomain: ??
file-view-domain: 127.0.0.1:8012
minio:
minio_url: http://minio.jeecg.com
minio_name: ??
minio_pass: ??
bucketName: otatest
jmreport:
saasMode:
firewall:
dataSourceSafe: false
lowCodeMode: dev
wps:
domain: https://wwo.wps.cn/office/
appid: ??
appsecret: ??
xxljob:
enabled: false
adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
appname: ${spring.application.name}
accessToken: ''
logPath: logs/jeecg/job/jobhandler/
logRetentionDays: 30
redisson:
address: jeecg-boot-redis:6379
password:
type: STANDALONE
enabled: true
ai-chat:
enabled: false
apiKey: ""
apiHost: "https://api.openai.com"
timeout: 60
ai-rag:
embed-store:
host: 127.0.0.1
port: 5432
database: postgres
user: postgres
password: postgres
table: embeddings
cas:
prefixUrl: http://localhost:8888/cas
knife4j:
production: false
basic:
enable: false
username: jeecg
password: jeecg1314
justauth:
enabled: true
type:
GITHUB:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/github/callback
WECHAT_ENTERPRISE:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/wechat_enterprise/callback
agent-id: ??
DINGTALK:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/thirdLogin/dingtalk/callback
cache:
type: default
prefix: 'demo::'
timeout: 1h
third-app:
enabled: false
type:
WECHAT_ENTERPRISE:
enabled: false
client-id: ??
client-secret: ??
agent-id: ??
DINGTALK:
enabled: false
client-id: ??
client-secret: ??
agent-id: ??

View File

@ -22,14 +22,21 @@ spring:
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat,wall,slf4j
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
filters: stat,slf4j
wall:
selectWhereAlwayTrueCheck: false
stat:
merge-sql: true
slow-sql-millis: 5000
datasource:
master:
url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# sharding-db:
# driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
# url: jdbc:shardingsphere:nacos:sharding.yaml?serverAddr=${spring.cloud.nacos.config.server-addr}&namespace=${spring.cloud.nacos.config.namespace}&group=${spring.cloud.nacos.config.group}
data:
redis:
database: 0
@ -51,9 +58,16 @@ spring:
max-concurrency: 1
retry:
enabled: true
flyway:
enabled: false
locations: classpath:flyway/sql/mysql
clean-disabled: true
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
firewall:
dataSourceSafe: false
lowCodeMode: dev
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
uploadType: local
@ -70,11 +84,7 @@ jeecg:
accessKey: ??
secretKey: ??
bucketName: jeecgdev
staticDomain: ??
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: jeecg-boot-es:9200
check-enabled: false
staticDomain: ??
file-view-domain: 127.0.0.1:8012
minio:
minio_url: http://minio.jeecg.com
@ -82,16 +92,17 @@ jeecg:
minio_pass: ??
bucketName: otatest
jmreport:
mode: dev
is_verify_token: false
verify_methods: remove,delete,save,add,update
saasMode:
firewall:
dataSourceSafe: false
lowCodeMode: dev
wps:
domain: https://wwo.wps.cn/office/
appid: ??
appsecret: ??
xxljob:
enabled: false
adminAddresses: http://jeecg-boot-xxljob:9080/xxl-job-admin
enabled: true
adminAddresses: http://jeecg-boot-xxljob:9080
appname: ${spring.application.name}
accessToken: ''
logPath: logs/jeecg/job/jobhandler/
@ -101,9 +112,19 @@ jeecg:
password:
type: STANDALONE
enabled: true
logging:
level:
org.jeecg.modules.system.mapper : info
ai-chat:
enabled: false
apiKey: ""
apiHost: "https://api.openai.com"
timeout: 60
ai-rag:
embed-store:
host: 127.0.0.1
port: 5432
database: postgres
user: postgres
password: postgres
table: embeddings
cas:
prefixUrl: http://localhost:8888/cas
knife4j:

View File

@ -7,7 +7,10 @@
"_genkey_0": "/sys/**",
"_genkey_1": "/jmreport/**",
"_genkey_3": "/online/**",
"_genkey_4": "/generic/**"
"_genkey_4": "/generic/**",
"_genkey_5": "/oauth2/**",
"_genkey_6": "/drag/**",
"_genkey_7": "/actuator/**"
}
}],
"filters": [],

View File

@ -3,7 +3,6 @@ jeecg:
config:
#type:database nacos yml
data-type: database
group: DEFAULT_GROUP
data-id: jeecg-gateway-router
spring:
data:
@ -11,4 +10,6 @@ spring:
database: 0
host: jeecg-boot-redis
port: 6379
password:
password:
knife4j:
production: false

View File

@ -16,7 +16,7 @@ management:
endpoints:
web:
exposure:
include: "*"
include: metrics,httpexchanges,jeecghttptrace
health:
sensitive: true
endpoint:
@ -32,15 +32,15 @@ spring:
username: jeecgos@163.com
password: ??
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
mail.smtp.timeout: 10000
mail.smtp.connectiontimeout: 10000
mail.smtp.writetimeout: 10000
mail.smtp.auth: true
smtp.ssl.enable: true
quartz:
job-store-type: jdbc
initialize-schema: embedded
jdbc:
initialize-schema: embedded
auto-startup: false
startup-delay: 1s
overwrite-existing-jobs: true
@ -63,14 +63,10 @@ spring:
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
aop:
proxy-target-class: true
activiti:
check-process-definitions: false
async-executor-activate: false
job-executor-activate: false
jpa:
open-in-view: false
freemarker:
@ -88,13 +84,36 @@ spring:
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
exclude:
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
global-config:
banner: false
db-config:
id-type: ASSIGN_ID
table-underline: true
configuration:
call-setters-on-nulls: true
call-setters-on-nulls: true
logging:
level:
org.springframework.context.support.PostProcessorRegistrationDelegate: error
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
org.jeecg.modules.demo.test.mapper: info
liteflow:
print-banner: false
parse-mode: PARSE_ONE_ON_FIRST_EXEC
rule-source-ext-data-map:
applicationName: jeecg
#是否开启SQL日志
sqlLogEnabled: true
chainTableName: airag_flow
#编排规则表中应用名称存储字段名
chainApplicationNameField: application_name
#规则名称存储的字段名
chainNameField: id
#EL表达式的字段(只存EL)
elDataField: chain
chainCustomSql: select id, application_name, chain from airag_flow where status = 'enable' and chain is not null

View File

@ -0,0 +1,37 @@
databaseName: sharding-db
dataSources:
db_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
password: root
username: root
rules:
- !SHARDING
tables:
sys_log:
actualDataNodes: db_0.sys_log$->{0..1}
databaseStrategy:
none:
tableStrategy:
standard:
shardingColumn: log_type
shardingAlgorithmName: user_inline
keyGenerateStrategy:
column: id
keyGeneratorName: snowflake
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
shardingAlgorithms:
user_inline:
type: INLINE
props:
algorithm-expression: sys_log$->{log_type % 2}
props:
sql-show: true

View File

@ -10,70 +10,68 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.18</version>
<version>4.1.0</version>
<relativePath/>
</parent>
<repositories>
<repository>
<id>aliyun</id>
<name>aliyun Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jeecg</id>
<name>jeecg Repository</name>
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<properties>
<log4j2.version>2.17.0</log4j2.version>
<nacos.version>2.3.2</nacos.version>
<nacos.version>3.2.2</nacos.version>
<jraft.version>1.4.0</jraft.version>
<hessian.version>4.0.66</hessian.version>
<dm8.version>8.1.3.140</dm8.version>
</properties>
<dependencies>
<!-- Hessian统一版本统一用 4.0.66 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-naming</artifactId>
<version>${nacos.version}</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-istio</artifactId>
<version>${nacos.version}</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-config</artifactId>
<version>${nacos.version}</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-console</artifactId>
<version>${nacos.version}</version>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
<version>${hessian.version}</version>
</dependency>
<!--达梦数据库驱动 版本号1-3-26-2023.07.26-197096-20046-ENT -->
<!-- Nacos 3.2.2(排除所有 hessian 传递依赖) -->
<dependency>
<groupId>org.jeecgframework.nacos3</groupId>
<artifactId>nacos-server</artifactId>
<version>${nacos.version}</version>
<exclusions>
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>hessian</artifactId>
</exclusion>
<exclusion>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos3</groupId>
<artifactId>nacos-console</artifactId>
<version>${nacos.version}</version>
<exclusions>
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>jraft-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>hessian</artifactId>
</exclusion>
<exclusion>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JRaft兼容 Java 17 无需 add-opens -->
<dependency>
<groupId>io.github.pig-mesh.sofa</groupId>
<artifactId>jraft-core</artifactId>
<version>${jraft.version}</version>
</dependency>
<!--达梦数据库驱动 -->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
@ -91,6 +89,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -1,50 +1,60 @@
package com.alibaba.nacos;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.nacos.NacosServerBasicApplication;
import com.alibaba.nacos.NacosServerWebApplication;
import com.alibaba.nacos.console.NacosConsole;
import com.alibaba.nacos.core.listener.startup.NacosStartUp;
import com.alibaba.nacos.core.listener.startup.NacosStartUpManager;
import com.alibaba.nacos.sys.env.Constants;
import com.alibaba.nacos.sys.env.DeploymentType;
import com.alibaba.nacos.sys.env.EnvUtil;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import static org.springframework.boot.context.logging.LoggingApplicationListener.CONFIG_PROPERTY;
import static org.springframework.core.io.ResourceLoader.CLASSPATH_URL_PREFIX;
/**
* Nacos 启动类
* Nacos 3.x 启动类三阶段启动
*
* @author zyf
* @author jeecg
*/
@SpringBootApplication(scanBasePackages = "com.alibaba.nacos")
@ServletComponentScan
@EnableScheduling
public class JeecgNacosApplication {
/** 是否单机模式启动 */
private static String standalone = "true";
/** 是否开启鉴权 */
private static String enabled = "false";
public static void main(String[] args) {
System.setProperty("nacos.standalone", "true");
System.setProperty(CONFIG_PROPERTY, CLASSPATH_URL_PREFIX + "logback-spring.xml");
public static void main(String[] args) {
System.setProperty("nacos.standalone", standalone);
System.setProperty("nacos.core.auth.enabled", enabled);
// //一旦Nacos初始化用户名nacos将不能被修改但你可以通过控制台或API来修改密码 https://nacos.io/en/blog/faq/nacos-user-question-history8420
// System.setProperty("nacos.core.auth.default.username", "nacos");
// System.setProperty("nacos.core.auth.default.password", "nacos");
System.setProperty("server.tomcat.basedir","logs");
//自定义启动端口号
System.setProperty("server.port","8848");
SpringApplication.run(JeecgNacosApplication.class, args);
}
String type = System.getProperty(Constants.NACOS_DEPLOYMENT_TYPE, Constants.NACOS_DEPLOYMENT_TYPE_MERGED);
DeploymentType deploymentType = DeploymentType.getType(type);
EnvUtil.setDeploymentType(deploymentType);
// Start Core Context
NacosStartUpManager.start(NacosStartUp.CORE_START_UP_PHASE);
ConfigurableApplicationContext coreContext = new SpringApplicationBuilder(NacosServerBasicApplication.class)
.web(WebApplicationType.NONE)
.run(args);
// Start Server Web Context
NacosStartUpManager.start(NacosStartUp.WEB_START_UP_PHASE);
new SpringApplicationBuilder(NacosServerWebApplication.class)
.parent(coreContext)
.run(args);
// Start Console Context
NacosStartUpManager.start(NacosStartUp.CONSOLE_START_UP_PHASE);
ConfigurableApplicationContext consoleContext = new SpringApplicationBuilder(NacosConsole.class)
.parent(coreContext)
.run(args);
String consolePort = consoleContext.getEnvironment().getProperty("server.port", "18080");
String consolePath = consoleContext.getEnvironment().getProperty("server.servlet.context-path", "/nacos");
System.out.println(" ----------------------------------------------------------");
System.out.println(" Nacos 3.x 启动成功!");
System.out.println(" 控制台地址: http://localhost:" + consolePort + consolePath);
System.out.println(" 服务器地址: http://localhost:8848/nacos");
System.out.println("---------------------------------------------------------- ");
}
/**
* 默认跳转首页
*
* @param model
* @return
*/
@GetMapping("/")
public String index(Model model, HttpServletResponse response) {
// 视图重定向 - 跳转
return "/nacos";
}
}

View File

@ -1,63 +0,0 @@
server:
servlet:
contextPath: /nacos
tomcat:
accesslog:
enabled: true
pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
basedir: ''
spring:
sql:
init:
platform: dm
db:
pool:
config:
driverClassName: dm.jdbc.driver.DmDriver
num: 1
password:
'0': SYSDBA
url:
'0': jdbc:dm://192.168.1.188:30236/DMSERVER?schema=NACOS&compatibleMode=mysql&ignoreCase=true&ENCODING=utf-8
user:
'0': SYSDBA
management:
metrics:
export:
elastic:
enabled: false
influx:
enabled: false
nacos:
core:
auth:
enabled: false
caching:
enabled: true
server:
identity:
key: example
value: example
plugin:
nacos:
token:
expire:
seconds: 18000
secret:
key: SecretKey01234567890123456789012345345678999987654901234567890123456789
system:
type: nacos
istio:
mcp:
server:
enabled: false
naming:
empty-service:
auto-clean: true
clean:
initial-delay-ms: 50000
period-time-ms: 30000
security:
ignore:
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
standalone: true

View File

@ -1,60 +0,0 @@
server:
servlet:
contextPath: /nacos
tomcat:
accesslog:
enabled: true
pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
basedir: ''
spring:
sql:
init:
platform: mysql
db:
num: 1
password:
'0': ${MYSQL-PWD:root}
url:
'0': jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
user:
'0': ${MYSQL-USER:root}
management:
metrics:
export:
elastic:
enabled: false
influx:
enabled: false
nacos:
core:
auth:
enabled: false
caching:
enabled: true
server:
identity:
key: nacos
value: nacos
plugin:
nacos:
token:
expire:
seconds: 18000
secret:
key: VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
system:
type: nacos
istio:
mcp:
server:
enabled: false
naming:
empty-service:
auto-clean: true
clean:
initial-delay-ms: 50000
period-time-ms: 30000
security:
ignore:
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
standalone: true

View File

@ -0,0 +1,58 @@
# Nacos ?????
nacos.console.port=18080
# Nacos ??????
nacos.server.main.port=8848
# ?????
spring.sql.init.platform=mysql
db.num=1
db.url.0=jdbc:mysql://jeecg-boot-mysql:3306/nacos?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
db.user=${MYSQL-USER:root}
db.password=${MYSQL-PWD:root}
# nacos ??????????? spring.datasource ????
spring.autoconfigure.exclude=org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
# ???? - ??
management.elastic.metrics.export.enabled=false
management.influx.metrics.export.enabled=false
# Nacos ??????????
nacos.config.push.maxRetryTime=50
# ???????
nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000
# Nacos ????????
nacos.server.contextPath=/nacos
# ??
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.max-days=30
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
server.tomcat.basedir=file:.
# ????????
spring.web.error.include-message=ALWAYS
# Nacos ???
nacos.console.contextPath=
nacos.console.remote.server.context-path=/nacos
# ???? - ???????????
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
nacos.core.auth.system.type=nacos
nacos.core.auth.enabled=false
nacos.core.auth.admin.enabled=false
nacos.core.auth.server.identity.key=nacos
nacos.core.auth.server.identity.value=nacos
nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
# ????: merged
nacos.deployment.type=merged
# ????
nacos.config.fuzzy.watch.max.pattern.count=20
nacos.config.fuzzy.watch.max.pattern.match.config.count=500
nacos.naming.fuzzy.watch.max.pattern.count=20
nacos.naming.fuzzy.watch.max.pattern.match.service.count=500
# ?? AI ?????
nacos.extension.ai.enabled=false
nacos.console.ad.enabled=false

View File

@ -1,3 +0,0 @@
spring:
profiles:
active: mysql

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
-->
<!--
小技巧: 在根pom里面设置统一存放路径统一管理方便维护
<properties>
<log-path>/Users/lengleng</log-path>
</properties>
1. 其他模块加日志输出直接copy本文件放在resources 目录即可
2. 注意修改 <property name="${log-path}/log.path" value=""/> 的value模块
-->
<configuration debug="false" scan="false">
<property name="log.path" value="logs/${project.artifactId}"/>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" class="org.springframework.boot.logging.logback.ColorConverter"/>
<conversionRule conversionWord="wex"
class="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
<conversionRule conversionWord="wEx"
class="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<logger name="org.activiti.engine.impl.db" level="DEBUG">
<appender-ref ref="debug"/>
</logger>
<!--nacos 心跳 INFO 屏蔽-->
<logger name="com.alibaba.nacos" level="OFF">
<appender-ref ref="error"/>
</logger>
<!--AJ 验证码INFO 屏蔽-->
<logger name="com.anji.captcha" level="OFF">
<appender-ref ref="error"/>
</logger>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</root>
</configuration>

View File

@ -11,7 +11,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.openfeign.EnableFeignClients;
@ -36,7 +35,6 @@ import java.net.UnknownHostException;
@SpringBootApplication
@EnableFeignClients(basePackages = {"org.jeecg"})
@EnableScheduling
@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
@ImportAutoConfiguration(JustAuthAutoConfiguration.class) // spring boot 3.x justauth 兼容性处理
public class JeecgSystemCloudApplication extends SpringBootServletInitializer implements CommandLineRunner {

View File

@ -670,7 +670,7 @@
<!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace>springboot3</config.namespace>
<config.namespace></config.namespace>
<!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名-->
@ -700,7 +700,7 @@
<!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace>springboot3</config.namespace>
<config.namespace></config.namespace>
<!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名-->
@ -718,7 +718,7 @@
<!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace>springboot3</config.namespace>
<config.namespace></config.namespace>
<!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名-->
@ -736,7 +736,7 @@
<!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace>springboot3</config.namespace>
<config.namespace></config.namespace>
<!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名-->