From 01b3fecb2d1b03861a72d53a7afea6ca557a209c Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Thu, 02 Apr 2026 15:02:41 +0800
Subject: [PATCH] 1
---
src/main/resources/application.yml | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 109fcbe..1b95eb5 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -2,7 +2,7 @@
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8090
- port: 8091
+ port: 8219
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
@@ -13,13 +13,13 @@
max: 800
# Tomcat启动初始化的线程数,默认值10
min-spare: 100
-
# 日志配置
logging:
+ file:
+ encoding: UTF-8
level:
com.ruoyi: debug
org.springframework: warn
-
# token配置
token:
# 令牌自定义标识
@@ -62,9 +62,25 @@
urlPatterns: /system/*,/monitor/*,/tool/*
spring:
jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Kolkata
profiles:
active: druid
+ flyway:
+ enabled: true
+ # 禁止清理数据库表
+ clean-disabled: false
+ # 如果数据库不是空表,需要设置成 true,否则启动报错
+ baseline-on-migrate: true
+ # 与 baseline-on-migrate: true 搭配使用
+ baseline-version: 0
+ #数据库连接配置
+ url: ${spring.datasource.url}
+ user: ${spring.datasource.username}
+ password: ${spring.datasource.password}
+ locations: classpath:db/migration/ #(根据个人情况设置,多个路径使用逗号分隔)
+ #版本控制日志表,默认flyway_schema_history
+ table: flyway_schema_history
# 文件上传
servlet:
multipart:
@@ -76,7 +92,7 @@
devtools:
restart:
# 热部署开关
- enabled: true
+ enabled: false
freemarker:
cache: false #false 页面不设置缓存,更改及生效!
@@ -91,7 +107,7 @@
# 端口,默认为6379
port: 6379
# 数据库索引
- database: 0
+ database: 6
# 密码
password:
# 连接超时时间
@@ -109,12 +125,10 @@
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://127.0.0.1:3306/stock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
- rname: root
- password: root
-# url: jdbc:mysql://114.29.252.25:3306/stock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-# username: root
-# password: Err;2[eoGFUriwdgr
+ #url: jdbc:mysql://127.0.0.1:6306/stock_ci?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://127.0.0.1:3306/stock-dg?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ username: stock-dg
+ password: MzrpGcasJDd5Bfsa
druid:
# 初始连接数
initialSize: 5
@@ -155,3 +169,9 @@
wall:
config:
multi-statement-allow: false
+ jpa:
+ hibernate:
+ ddl-auto: none # 可选值: create, create-drop, update, validate, none
+ show-sql: false # 显示SQL语句
+ properties:
+ hibernate.format_sql: true # 格式化SQL语句
\ No newline at end of file
--
Gitblit v1.9.3