feat:hair-link初始化

pull/1126/head
9264yf 2025-12-17 15:37:31 +08:00
parent 075e96466f
commit a50dc8af8a
26 changed files with 528 additions and 1191 deletions

View File

@ -0,0 +1,3 @@
# Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references
.specstory/**

355
.env.example 100644
View File

@ -0,0 +1,355 @@
################################################################################
# Hair-Link 美发预约管理系统 - 环境变量配置模板
#
# 使用说明:
# 1. 复制此文件为 .env开发环境或 .env.production生产环境
# 2. 根据实际环境修改配置值
# 3. 确保 .env 文件已添加到 .gitignore不要提交到版本控制
# 4. 所有配置项都有默认值,可选择性覆盖
################################################################################
#==============================================================================
# 数据库配置 (Database Configuration)
#==============================================================================
# 主数据库主机地址
# 默认: localhost
HAIRLINK_DB_HOST=localhost
# 主数据库端口
# 默认: 3306
HAIRLINK_DB_PORT=3306
# 主数据库名称
# 默认: ry-vue
HAIRLINK_DB_NAME=ry-vue
# 主数据库连接参数
# 默认: useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
HAIRLINK_DB_PARAMS=useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# 主数据库用户名
# 默认: root
HAIRLINK_DB_USERNAME=root
# 主数据库密码
# 默认: password
# ⚠️ 生产环境请务必修改为强密码
HAIRLINK_DB_PASSWORD=password
# 从数据库开关(读写分离)
# 可选值: true/false
# 默认: false
HAIRLINK_DB_SLAVE_ENABLED=false
# 从数据库主机地址(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_HOST=slave-host
# 从数据库端口(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_PORT=3306
# 从数据库名称(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_NAME=ry-vue
# 从数据库连接参数(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_PARAMS=useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# 从数据库用户名(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_USERNAME=root
# 从数据库密码(仅在启用从库时需要配置)
# 默认: (空)
# HAIRLINK_DB_SLAVE_PASSWORD=password
#------------------------------------------------------------------------------
# 数据库连接池配置 (Database Connection Pool)
#------------------------------------------------------------------------------
# 初始连接数
# 默认: 5
HAIRLINK_DB_INITIAL_SIZE=5
# 最小空闲连接数
# 默认: 10
HAIRLINK_DB_MIN_IDLE=10
# 最大活动连接数
# 默认: 20
HAIRLINK_DB_MAX_ACTIVE=20
# 获取连接等待超时时间(毫秒)
# 默认: 60000 (60秒)
HAIRLINK_DB_MAX_WAIT=60000
# 连接超时时间(毫秒)
# 默认: 30000 (30秒)
HAIRLINK_DB_CONNECT_TIMEOUT=30000
# 网络超时时间(毫秒)
# 默认: 60000 (60秒)
HAIRLINK_DB_SOCKET_TIMEOUT=60000
# 空闲连接检测间隔(毫秒)
# 默认: 60000 (60秒)
HAIRLINK_DB_TIME_BETWEEN_EVICTION=60000
# 连接在池中最小空闲时间(毫秒)
# 默认: 300000 (5分钟)
HAIRLINK_DB_MIN_EVICTABLE_IDLE_TIME=300000
# 连接在池中最大空闲时间(毫秒)
# 默认: 900000 (15分钟)
HAIRLINK_DB_MAX_EVICTABLE_IDLE_TIME=900000
#==============================================================================
# Redis 配置 (Redis Configuration)
#==============================================================================
# Redis 服务器地址
# 默认: localhost
HAIRLINK_REDIS_HOST=localhost
# Redis 服务器端口
# 默认: 6379
HAIRLINK_REDIS_PORT=6379
# Redis 数据库索引0-15
# 默认: 0
HAIRLINK_REDIS_DATABASE=0
# Redis 密码如果Redis未设置密码留空即可
# 默认: (空)
HAIRLINK_REDIS_PASSWORD=
# Redis 连接超时时间
# 默认: 10s
HAIRLINK_REDIS_TIMEOUT=10s
#------------------------------------------------------------------------------
# Redis 连接池配置 (Redis Connection Pool)
#------------------------------------------------------------------------------
# 连接池中的最小空闲连接
# 默认: 0
HAIRLINK_REDIS_MIN_IDLE=0
# 连接池中的最大空闲连接
# 默认: 8
HAIRLINK_REDIS_MAX_IDLE=8
# 连接池的最大数据库连接数
# 默认: 8
HAIRLINK_REDIS_MAX_ACTIVE=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
# 默认: -1ms
HAIRLINK_REDIS_MAX_WAIT=-1ms
#==============================================================================
# 应用服务配置 (Application Server Configuration)
#==============================================================================
# 应用服务器端口
# 默认: 8080
HAIRLINK_SERVER_PORT=8080
# 应用上下文路径
# 默认: /
# 示例: /api 则访问地址为 http://localhost:8080/api
HAIRLINK_CONTEXT_PATH=/
# Tomcat URI 编码
# 默认: UTF-8
HAIRLINK_SERVER_URI_ENCODING=UTF-8
# 连接数满后的排队数
# 默认: 1000
HAIRLINK_SERVER_ACCEPT_COUNT=1000
# Tomcat 最大线程数
# 默认: 800
HAIRLINK_SERVER_MAX_THREADS=800
# Tomcat 启动初始化的线程数
# 默认: 100
HAIRLINK_SERVER_MIN_SPARE_THREADS=100
#------------------------------------------------------------------------------
# 文件上传配置 (File Upload Configuration)
#------------------------------------------------------------------------------
# 文件上传存储路径
# 默认: ./upload (相对路径,自动适配操作系统)
# Windows示例: D:/hairlink/upload
# Linux示例: /home/hairlink/upload
HAIRLINK_UPLOAD_PATH=./upload
# 单个文件大小限制
# 默认: 10MB
HAIRLINK_MAX_FILE_SIZE=10MB
# 总上传文件大小限制
# 默认: 20MB
HAIRLINK_MAX_REQUEST_SIZE=20MB
#==============================================================================
# Token 安全配置 (Token Security Configuration)
#==============================================================================
# JWT Token 请求头名称
# 默认: Authorization
HAIRLINK_TOKEN_HEADER=Authorization
# JWT Token 密钥
# 默认: abcdefghijklmnopqrstuvwxyz
# ⚠️ 生产环境请务必修改为复杂的随机字符串建议32位以上
# 生成方法: openssl rand -base64 32
HAIRLINK_TOKEN_SECRET=abcdefghijklmnopqrstuvwxyz
# Token 过期时间(单位:分钟)
# 默认: 30
HAIRLINK_TOKEN_EXPIRE_TIME=30
#==============================================================================
# 用户密码策略配置 (Password Policy Configuration)
#==============================================================================
# 密码最大错误尝试次数
# 超过此次数将锁定账户
# 默认: 5
HAIRLINK_PASSWORD_MAX_RETRY=5
# 密码错误锁定时间(单位:分钟)
# 默认: 10
HAIRLINK_PASSWORD_LOCK_TIME=10
#==============================================================================
# 应用功能配置 (Application Features Configuration)
#==============================================================================
# 验证码类型
# 可选值: math(数学计算) / char(字符验证)
# 默认: math
HAIRLINK_CAPTCHA_TYPE=math
# IP地址获取开关
# 是否启用IP地址解析功能
# 可选值: true/false
# 默认: false
HAIRLINK_ADDRESS_ENABLED=false
# 热部署开关
# 开发环境建议开启,生产环境建议关闭
# 可选值: true/false
# 默认: true
HAIRLINK_DEVTOOLS_ENABLED=true
#==============================================================================
# XSS 防护配置 (XSS Protection Configuration)
#==============================================================================
# XSS 过滤开关
# 可选值: true/false
# 默认: true
HAIRLINK_XSS_ENABLED=true
# XSS 排除链接(多个用逗号分隔)
# 这些链接不进行XSS过滤
# 默认: /system/notice
HAIRLINK_XSS_EXCLUDES=/system/notice
# XSS 匹配链接(多个用逗号分隔)
# 只对这些链接进行XSS过滤
# 默认: /system/*,/monitor/*,/tool/*
HAIRLINK_XSS_URL_PATTERNS=/system/*,/monitor/*,/tool/*
#==============================================================================
# 防盗链配置 (Referer Protection Configuration)
#==============================================================================
# 防盗链开关
# 可选值: true/false
# 默认: false
HAIRLINK_REFERER_ENABLED=false
# 允许的域名列表(多个用逗号分隔)
# 默认: localhost,127.0.0.1
HAIRLINK_REFERER_ALLOWED_DOMAINS=localhost,127.0.0.1
#==============================================================================
# Druid 数据库监控配置 (Druid Monitor Configuration)
#==============================================================================
# Druid 监控后台管理员用户名
# 访问地址: http://localhost:8080/druid
# 默认: admin
# ⚠️ 生产环境请务必修改
HAIRLINK_DRUID_USERNAME=admin
# Druid 监控后台管理员密码
# 默认: 123456
# ⚠️ 生产环境请务必修改为强密码
HAIRLINK_DRUID_PASSWORD=123456
# 慢 SQL 记录阈值(单位:毫秒)
# 超过此时间的SQL将被记录为慢SQL
# 默认: 1000 (1秒)
HAIRLINK_DRUID_SLOW_SQL_MILLIS=1000
#==============================================================================
# 日志配置 (Logging Configuration)
#==============================================================================
# 日志文件存储路径
# 默认: ./logs (相对路径,自动适配操作系统)
# Windows示例: D:/hairlink/logs
# Linux示例: /home/hairlink/logs
HAIRLINK_LOG_PATH=./logs
# 日志文件保留天数
# 默认: 60
HAIRLINK_LOG_MAX_HISTORY=60
# com.ruoyi 包的日志级别
# 可选值: trace/debug/info/warn/error
# 默认: debug
HAIRLINK_LOG_LEVEL_RUOYI=debug
# Spring 框架的日志级别
# 可选值: trace/debug/info/warn/error
# 默认: warn
HAIRLINK_LOG_LEVEL_SPRING=warn
#==============================================================================
# Swagger API 文档配置 (Swagger Configuration)
#==============================================================================
# Swagger 开关
# 开发环境建议开启,生产环境建议关闭
# 可选值: true/false
# 默认: true
HAIRLINK_SWAGGER_ENABLED=true
# Swagger 请求前缀
# 默认: /dev-api
HAIRLINK_SWAGGER_PATH_MAPPING=/dev-api
################################################################################
# 配置优先级说明:
# 1. 环境变量 > YAML配置文件
# 2. 如果环境变量未设置将使用YAML中的默认值
# 3. 建议生产环境通过环境变量覆盖敏感配置
#
# 生产环境必须修改的配置项:
# - HAIRLINK_DB_PASSWORD: 数据库密码
# - HAIRLINK_TOKEN_SECRET: Token密钥建议32位以上随机字符串
# - HAIRLINK_DRUID_PASSWORD: Druid监控密码
# - HAIRLINK_REDIS_PASSWORD: Redis密码如果Redis设置了密码
# - HAIRLINK_DEVTOOLS_ENABLED: 建议设置为false
# - HAIRLINK_SWAGGER_ENABLED: 建议设置为false
################################################################################

44
.gitignore vendored
View File

@ -45,3 +45,47 @@ nbdist/
!*/build/*.java !*/build/*.java
!*/build/*.html !*/build/*.html
!*/build/*.xml !*/build/*.xml
# 灵妙AI开发助手自动添加
.specstory/
log/
logs/
**/AGENTS.md
**/WARP.md
**/GEMINI.md
.bmad/
.claude/commands/bmad/
.cursor/rules/bmad/
.cursor/rules/root-prompt.mdc
# MCP反馈端口文件灵妙AI开发助手自动添加
.mcp-feedback-port
# 点思工坊工作流目录灵妙AI开发助手自动添加
.diansi/workflows
# 数据库数据目录灵妙AI开发助手自动添加
mysql_data/
redis_data/
pgvector_data/
# 进程ID文件目录灵妙AI开发助手自动添加
.pids/
# 本地设置文件灵妙AI开发助手自动添加
.claude/settings.local.json
######################################################################
# Environment Variables & Application Data
# 环境变量配置文件(包含敏感信息,不提交到版本控制)
.env
.env.local
.env.development
.env.test
.env.production
.env.*.local
# 上传文件目录
upload/
uploadPath/

View File

@ -5,12 +5,12 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<version>3.9.0</version> <version>3.9.0</version>
<name>ruoyi</name> <name>hair-link</name>
<url>http://www.ruoyi.vip</url> <url>http://www.example.com</url>
<description>若依管理系统</description> <description>Hair-Link 美发预约管理系统</description>
<properties> <properties>
<ruoyi.version>3.9.0</ruoyi.version> <ruoyi.version>3.9.0</ruoyi.version>

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -16,15 +16,14 @@ public class RuoYiApplication
{ {
// System.setProperty("spring.devtools.restart.enabled", "false"); // System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("\n" +
" .-------. ____ __ \n" + " ███████╗██╗ ██╗██╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗ ██████╗ \n" +
" | _ _ \\ \\ \\ / / \n" + " ██╔════╝██║ ██║██║██╔════╝ ██║ ██║██╔══██╗████╗ ██║██╔════╝ \n" +
" | ( ' ) | \\ _. / ' \n" + " ███████╗███████║██║██║ ███╗██║ ██║███████║██╔██╗ ██║██║ ███╗\n" +
" |(_ o _) / _( )_ .' \n" + " ╚════██║██╔══██║██║██║ ██║██║ ██║██╔══██║██║╚██╗██║██║ ██║\n" +
" | (_,_).' __ ___(_ o _)' \n" + " ███████║██║ ██║██║╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║╚██████╔╝\n" +
" | |\\ \\ | || |(_,_)' \n" + " ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ \n" +
" | | \\ `' /| `-' / \n" + "\n" +
" | | \\ / \\ / \n" + " 【 时 光 】 启动成功!\n");
" ''-' `'-' `-..-' ");
} }
} }

View File

@ -6,34 +6,34 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://${HAIRLINK_DB_HOST:localhost}:${HAIRLINK_DB_PORT:3306}/${HAIRLINK_DB_NAME:ry-vue}?${HAIRLINK_DB_PARAMS:useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8}
username: root username: ${HAIRLINK_DB_USERNAME:root}
password: password password: ${HAIRLINK_DB_PASSWORD:password}
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: false enabled: ${HAIRLINK_DB_SLAVE_ENABLED:false}
url: url: jdbc:mysql://${HAIRLINK_DB_SLAVE_HOST:}:${HAIRLINK_DB_SLAVE_PORT:}/${HAIRLINK_DB_SLAVE_NAME:}?${HAIRLINK_DB_SLAVE_PARAMS:}
username: username: ${HAIRLINK_DB_SLAVE_USERNAME:}
password: password: ${HAIRLINK_DB_SLAVE_PASSWORD:}
# 初始连接数 # 初始连接数
initialSize: 5 initialSize: ${HAIRLINK_DB_INITIAL_SIZE:5}
# 最小连接池数量 # 最小连接池数量
minIdle: 10 minIdle: ${HAIRLINK_DB_MIN_IDLE:10}
# 最大连接池数量 # 最大连接池数量
maxActive: 20 maxActive: ${HAIRLINK_DB_MAX_ACTIVE:20}
# 配置获取连接等待超时的时间 # 配置获取连接等待超时的时间
maxWait: 60000 maxWait: ${HAIRLINK_DB_MAX_WAIT:60000}
# 配置连接超时时间 # 配置连接超时时间
connectTimeout: 30000 connectTimeout: ${HAIRLINK_DB_CONNECT_TIMEOUT:30000}
# 配置网络超时时间 # 配置网络超时时间
socketTimeout: 60000 socketTimeout: ${HAIRLINK_DB_SOCKET_TIMEOUT:60000}
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000 timeBetweenEvictionRunsMillis: ${HAIRLINK_DB_TIME_BETWEEN_EVICTION:60000}
# 配置一个连接在池中最小生存的时间,单位是毫秒 # 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000 minEvictableIdleTimeMillis: ${HAIRLINK_DB_MIN_EVICTABLE_IDLE_TIME:300000}
# 配置一个连接在池中最大生存的时间,单位是毫秒 # 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000 maxEvictableIdleTimeMillis: ${HAIRLINK_DB_MAX_EVICTABLE_IDLE_TIME:900000}
# 配置检测连接是否有效 # 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true testWhileIdle: true
@ -47,14 +47,14 @@ spring:
allow: allow:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: ruoyi login-username: ${HAIRLINK_DRUID_USERNAME:admin}
login-password: 123456 login-password: ${HAIRLINK_DRUID_PASSWORD:123456}
filter: filter:
stat: stat:
enabled: true enabled: true
# 慢SQL记录 # 慢SQL记录
log-slow-sql: true log-slow-sql: true
slow-sql-millis: 1000 slow-sql-millis: ${HAIRLINK_DRUID_SLOW_SQL_MILLIS:1000}
merge-sql: true merge-sql: true
wall: wall:
config: config:

View File

@ -1,49 +1,49 @@
# 项目相关配置 # 项目相关配置
ruoyi: hairlink:
# 名称 # 名称
name: RuoYi name: Hair-Link
# 版本 # 版本
version: 3.9.0 version: 3.9.0
# 版权年份 # 版权年份
copyrightYear: 2025 copyrightYear: 2025
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/hairlink/uploadPathLinux配置 /home/hairlink/uploadPath
profile: D:/ruoyi/uploadPath profile: ${HAIRLINK_UPLOAD_PATH:./upload}
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: ${HAIRLINK_ADDRESS_ENABLED:false}
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: ${HAIRLINK_CAPTCHA_TYPE:math}
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
port: 8080 port: ${HAIRLINK_SERVER_PORT:8080}
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: ${HAIRLINK_CONTEXT_PATH:/}
tomcat: tomcat:
# tomcat的URI编码 # tomcat的URI编码
uri-encoding: UTF-8 uri-encoding: ${HAIRLINK_SERVER_URI_ENCODING:UTF-8}
# 连接数满后的排队数默认为100 # 连接数满后的排队数默认为100
accept-count: 1000 accept-count: ${HAIRLINK_SERVER_ACCEPT_COUNT:1000}
threads: threads:
# tomcat最大线程数默认为200 # tomcat最大线程数默认为200
max: 800 max: ${HAIRLINK_SERVER_MAX_THREADS:800}
# Tomcat启动初始化的线程数默认值10 # Tomcat启动初始化的线程数默认值10
min-spare: 100 min-spare: ${HAIRLINK_SERVER_MIN_SPARE_THREADS:100}
# 日志配置 # 日志配置
logging: logging:
level: level:
com.ruoyi: debug com.ruoyi: ${HAIRLINK_LOG_LEVEL_RUOYI:debug}
org.springframework: warn org.springframework: ${HAIRLINK_LOG_LEVEL_SPRING:warn}
# 用户配置 # 用户配置
user: user:
password: password:
# 密码最大错误次数 # 密码最大错误次数
maxRetryCount: 5 maxRetryCount: ${HAIRLINK_PASSWORD_MAX_RETRY:5}
# 密码锁定时间默认10分钟 # 密码锁定时间默认10分钟
lockTime: 10 lockTime: ${HAIRLINK_PASSWORD_LOCK_TIME:10}
# Spring配置 # Spring配置
spring: spring:
@ -57,45 +57,45 @@ spring:
servlet: servlet:
multipart: multipart:
# 单个文件大小 # 单个文件大小
max-file-size: 10MB max-file-size: ${HAIRLINK_MAX_FILE_SIZE:10MB}
# 设置总上传的文件大小 # 设置总上传的文件大小
max-request-size: 20MB max-request-size: ${HAIRLINK_MAX_REQUEST_SIZE:20MB}
# 服务模块 # 服务模块
devtools: devtools:
restart: restart:
# 热部署开关 # 热部署开关
enabled: true enabled: ${HAIRLINK_DEVTOOLS_ENABLED:true}
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
host: localhost host: ${HAIRLINK_REDIS_HOST:localhost}
# 端口默认为6379 # 端口默认为6379
port: 6379 port: ${HAIRLINK_REDIS_PORT:6379}
# 数据库索引 # 数据库索引
database: 0 database: ${HAIRLINK_REDIS_DATABASE:0}
# 密码 # 密码
password: password: ${HAIRLINK_REDIS_PASSWORD:}
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: ${HAIRLINK_REDIS_TIMEOUT:10s}
lettuce: lettuce:
pool: pool:
# 连接池中的最小空闲连接 # 连接池中的最小空闲连接
min-idle: 0 min-idle: ${HAIRLINK_REDIS_MIN_IDLE:0}
# 连接池中的最大空闲连接 # 连接池中的最大空闲连接
max-idle: 8 max-idle: ${HAIRLINK_REDIS_MAX_IDLE:8}
# 连接池的最大数据库连接数 # 连接池的最大数据库连接数
max-active: 8 max-active: ${HAIRLINK_REDIS_MAX_ACTIVE:8}
# #连接池最大阻塞等待时间(使用负值表示没有限制) # #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms max-wait: ${HAIRLINK_REDIS_MAX_WAIT:-1ms}
# token配置 # token配置
token: token:
# 令牌自定义标识 # 令牌自定义标识
header: Authorization header: ${HAIRLINK_TOKEN_HEADER:Authorization}
# 令牌密钥 # 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz secret: ${HAIRLINK_TOKEN_SECRET:abcdefghijklmnopqrstuvwxyz}
# 令牌有效期默认30分钟 # 令牌有效期默认30分钟
expireTime: 30 expireTime: ${HAIRLINK_TOKEN_EXPIRE_TIME:30}
# MyBatis配置 # MyBatis配置
mybatis: mybatis:
@ -115,22 +115,22 @@ pagehelper:
# Swagger配置 # Swagger配置
swagger: swagger:
# 是否开启swagger # 是否开启swagger
enabled: true enabled: ${HAIRLINK_SWAGGER_ENABLED:true}
# 请求前缀 # 请求前缀
pathMapping: /dev-api pathMapping: ${HAIRLINK_SWAGGER_PATH_MAPPING:/dev-api}
# 防盗链配置 # 防盗链配置
referer: referer:
# 防盗链开关 # 防盗链开关
enabled: false enabled: ${HAIRLINK_REFERER_ENABLED:false}
# 允许的域名列表 # 允许的域名列表
allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip allowed-domains: ${HAIRLINK_REFERER_ALLOWED_DOMAINS:localhost,127.0.0.1}
# 防止XSS攻击 # 防止XSS攻击
xss: xss:
# 过滤开关 # 过滤开关
enabled: true enabled: ${HAIRLINK_XSS_ENABLED:true}
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: ${HAIRLINK_XSS_EXCLUDES:/system/notice}
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: ${HAIRLINK_XSS_URL_PATTERNS:/system/*,/monitor/*,/tool/*}

View File

@ -1,24 +1,30 @@
Application Version: ${ruoyi.version} Application Version: ${hairlink.version}
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
////////////////////////////////////////////////////////////////////
// _ooOoo_ // ╔═══════════════════════╗
// o8888888o // ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║
// 88" . "88 // ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║
// (| ^_^ |) // ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ║
// O\ = /O // ╚══╗ ▓▓▓▓▓▓▓▓▓ ╔══╝
// ____/`---'\____ // ╲ ▓▓▓▓▓▓▓
// .' \\| |// `. // ╲ ▓▓▓▓▓
// / \\||| : |||// \ // ╲ ▓▓▓
// / _||||| -:- |||||- \ // ╲ ▓
// | | \\\ - /// | | //
// | \_| ''\---/'' | | //
// \ .-\__ `-` ___/-. / //
// ___`. .' /--.--\ `. . ___ // V
// ."" '< `.___\_<|>_/___.' >'"". //
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
// \ \ `-. \_ __\ /__ _/ .-` / / //
// ========`-.____`-.___\_____/___.-`____.-'======== // ░ ╲
// `=---=' // ░░░ ╲
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // ░░░░░ ╲
// 佛祖保佑 永不宕机 永无BUG // ░░░░░░░ ╲
//////////////////////////////////////////////////////////////////// ╔══╝ ░░░░░░░░░ ╚══╗
║ ░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░░░ ║
╚═══════════════════════╝
═══【时 光】═══

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<!-- 日志存放路径 --> <!-- 日志存放路径 -->
<property name="log.path" value="/home/ruoyi/logs" /> <property name="log.path" value="${HAIRLINK_LOG_PATH:-./logs}" />
<!-- 日志输出格式 --> <!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
@ -20,7 +20,7 @@
<!-- 日志文件名格式 --> <!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern> <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>${HAIRLINK_LOG_MAX_HISTORY:-60}</maxHistory>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
@ -42,7 +42,7 @@
<!-- 日志文件名格式 --> <!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern> <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>${HAIRLINK_LOG_MAX_HISTORY:-60}</maxHistory>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
@ -64,7 +64,7 @@
<!-- 按天回滚 daily --> <!-- 按天回滚 daily -->
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>${HAIRLINK_LOG_MAX_HISTORY:-60}</maxHistory>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -5,11 +5,11 @@ import org.springframework.stereotype.Component;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Component @Component
@ConfigurationProperties(prefix = "ruoyi") @ConfigurationProperties(prefix = "hairlink")
public class RuoYiConfig public class RuoYiConfig
{ {
/** 项目名称 */ /** 项目名称 */

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>ruoyi</artifactId> <artifactId>hair-link</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>3.9.0</version> <version>3.9.0</version>
</parent> </parent>

View File

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 若依管理系统 VUE_APP_TITLE = Hair-Link
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # Hair-Link/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载

View File

@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 若依管理系统 VUE_APP_TITLE = Hair-Link
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # Hair-Link/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'

View File

@ -1,8 +1,8 @@
{ {
"name": "ruoyi", "name": "hair-link",
"version": "3.9.0", "version": "3.9.0",
"description": "若依管理系统", "description": "Hair-Link 美发预约管理系统",
"author": "若依", "author": "时光",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
@ -19,10 +19,6 @@
"admin-template", "admin-template",
"management-system" "management-system"
], ],
"repository": {
"type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": { "dependencies": {
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.28.1", "axios": "0.28.1",

View File

@ -1,21 +0,0 @@
<template>
<div>
<svg-icon icon-class="question" @click="goto" />
</div>
</template>
<script>
export default {
name: 'RuoYiDoc',
data() {
return {
url: 'http://doc.ruoyi.vip/ruoyi-vue'
}
},
methods: {
goto() {
window.open(this.url)
}
}
}
</script>

View File

@ -1,21 +0,0 @@
<template>
<div>
<svg-icon icon-class="github" @click="goto" />
</div>
</template>
<script>
export default {
name: 'RuoYiGit',
data() {
return {
url: 'https://gitee.com/y_project/RuoYi-Vue'
}
},
methods: {
goto() {
window.open(this.url)
}
}
}
</script>

View File

@ -9,14 +9,6 @@
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom"> <el-tooltip content="布局大小" effect="dark" placement="bottom">
@ -54,8 +46,6 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
export default { export default {
emits: ['setLayout'], emits: ['setLayout'],
@ -65,9 +55,7 @@ export default {
Hamburger, Hamburger,
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search, Search
RuoYiGit,
RuoYiDoc
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([

View File

@ -52,5 +52,5 @@ module.exports = {
/** /**
* 底部版权文本内容 * 底部版权文本内容
*/ */
footerContent: 'Copyright © 2018-2025 RuoYi. All Rights Reserved.' footerContent: 'Copyright © 2025 时光. All Rights Reserved.'
} }

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2025 时光. All Rights Reserved.</span>
</div> </div>
</div> </div>
</template> </template>

View File

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || 'Hair-Link' // 网页标题
const baseUrl = 'http://localhost:8080' // 后端接口 const baseUrl = 'http://localhost:8080' // 后端接口
@ -19,7 +19,7 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口
module.exports = { module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.example.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.example.com/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/", publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist', outputDir: 'dist',
@ -65,7 +65,7 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 // 使用gzip解压缩静态文件
new CompressionPlugin({ new CompressionPlugin({
cache: false, // 不启用文件缓存 cache: false, // 不启用文件缓存
test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式 test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式