diff --git a/.cursorindexingignore b/.cursorindexingignore new file mode 100644 index 000000000..953908e73 --- /dev/null +++ b/.cursorindexingignore @@ -0,0 +1,3 @@ + +# Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references +.specstory/** diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..16f2f07a7 --- /dev/null +++ b/.env.example @@ -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 +################################################################################ diff --git a/.gitignore b/.gitignore index 0c0da3e07..4342bbffb 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,47 @@ nbdist/ !*/build/*.java !*/build/*.html !*/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/ diff --git a/pom.xml b/pom.xml index 66fc545cc..d50117569 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ 4.0.0 com.ruoyi - ruoyi + hair-link 3.9.0 - ruoyi - http://www.ruoyi.vip - 若依管理系统 + hair-link + http://www.example.com + Hair-Link 美发预约管理系统 3.9.0 diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 434b5f07d..4e1863e77 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index e3c56ee54..4dacd4485 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -16,15 +16,14 @@ public class RuoYiApplication { // System.setProperty("spring.devtools.restart.enabled", "false"); SpringApplication.run(RuoYiApplication.class, args); - System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" + - " .-------. ____ __ \n" + - " | _ _ \\ \\ \\ / / \n" + - " | ( ' ) | \\ _. / ' \n" + - " |(_ o _) / _( )_ .' \n" + - " | (_,_).' __ ___(_ o _)' \n" + - " | |\\ \\ | || |(_,_)' \n" + - " | | \\ `' /| `-' / \n" + - " | | \\ / \\ / \n" + - " ''-' `'-' `-..-' "); + System.out.println("\n" + + " ███████╗██╗ ██╗██╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗ ██████╗ \n" + + " ██╔════╝██║ ██║██║██╔════╝ ██║ ██║██╔══██╗████╗ ██║██╔════╝ \n" + + " ███████╗███████║██║██║ ███╗██║ ██║███████║██╔██╗ ██║██║ ███╗\n" + + " ╚════██║██╔══██║██║██║ ██║██║ ██║██╔══██║██║╚██╗██║██║ ██║\n" + + " ███████║██║ ██║██║╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║╚██████╔╝\n" + + " ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ \n" + + "\n" + + " 【 时 光 】 启动成功!\n"); } } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index bcfad3eae..7a3afb098 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,34 +6,34 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: password + 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: ${HAIRLINK_DB_USERNAME:root} + password: ${HAIRLINK_DB_PASSWORD:password} # 从库数据源 slave: # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: + enabled: ${HAIRLINK_DB_SLAVE_ENABLED:false} + url: jdbc:mysql://${HAIRLINK_DB_SLAVE_HOST:}:${HAIRLINK_DB_SLAVE_PORT:}/${HAIRLINK_DB_SLAVE_NAME:}?${HAIRLINK_DB_SLAVE_PARAMS:} + username: ${HAIRLINK_DB_SLAVE_USERNAME:} + 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 testWhileIdle: true @@ -47,14 +47,14 @@ spring: allow: url-pattern: /druid/* # 控制台管理用户名和密码 - login-username: ruoyi - login-password: 123456 + login-username: ${HAIRLINK_DRUID_USERNAME:admin} + login-password: ${HAIRLINK_DRUID_PASSWORD:123456} filter: stat: enabled: true # 慢SQL记录 log-slow-sql: true - slow-sql-millis: 1000 + slow-sql-millis: ${HAIRLINK_DRUID_SLOW_SQL_MILLIS:1000} merge-sql: true wall: config: diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d15705c48..79c54a9e3 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -1,49 +1,49 @@ # 项目相关配置 -ruoyi: +hairlink: # 名称 - name: RuoYi + name: Hair-Link # 版本 version: 3.9.0 # 版权年份 copyrightYear: 2025 - # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + # 文件路径 示例( Windows配置D:/hairlink/uploadPath,Linux配置 /home/hairlink/uploadPath) + profile: ${HAIRLINK_UPLOAD_PATH:./upload} # 获取ip地址开关 - addressEnabled: false + addressEnabled: ${HAIRLINK_ADDRESS_ENABLED:false} # 验证码类型 math 数字计算 char 字符验证 - captchaType: math + captchaType: ${HAIRLINK_CAPTCHA_TYPE:math} # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8080 + port: ${HAIRLINK_SERVER_PORT:8080} servlet: # 应用的访问路径 - context-path: / + context-path: ${HAIRLINK_CONTEXT_PATH:/} tomcat: # tomcat的URI编码 - uri-encoding: UTF-8 + uri-encoding: ${HAIRLINK_SERVER_URI_ENCODING:UTF-8} # 连接数满后的排队数,默认为100 - accept-count: 1000 + accept-count: ${HAIRLINK_SERVER_ACCEPT_COUNT:1000} threads: # tomcat最大线程数,默认为200 - max: 800 + max: ${HAIRLINK_SERVER_MAX_THREADS:800} # Tomcat启动初始化的线程数,默认值10 - min-spare: 100 + min-spare: ${HAIRLINK_SERVER_MIN_SPARE_THREADS:100} # 日志配置 logging: level: - com.ruoyi: debug - org.springframework: warn + com.ruoyi: ${HAIRLINK_LOG_LEVEL_RUOYI:debug} + org.springframework: ${HAIRLINK_LOG_LEVEL_SPRING:warn} # 用户配置 user: password: # 密码最大错误次数 - maxRetryCount: 5 + maxRetryCount: ${HAIRLINK_PASSWORD_MAX_RETRY:5} # 密码锁定时间(默认10分钟) - lockTime: 10 + lockTime: ${HAIRLINK_PASSWORD_LOCK_TIME:10} # Spring配置 spring: @@ -57,45 +57,45 @@ spring: servlet: 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: restart: # 热部署开关 - enabled: true + enabled: ${HAIRLINK_DEVTOOLS_ENABLED:true} # redis 配置 redis: # 地址 - host: localhost + host: ${HAIRLINK_REDIS_HOST:localhost} # 端口,默认为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: 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: # 令牌自定义标识 - header: Authorization + header: ${HAIRLINK_TOKEN_HEADER:Authorization} # 令牌密钥 - secret: abcdefghijklmnopqrstuvwxyz + secret: ${HAIRLINK_TOKEN_SECRET:abcdefghijklmnopqrstuvwxyz} # 令牌有效期(默认30分钟) - expireTime: 30 + expireTime: ${HAIRLINK_TOKEN_EXPIRE_TIME:30} # MyBatis配置 mybatis: @@ -115,22 +115,22 @@ pagehelper: # Swagger配置 swagger: # 是否开启swagger - enabled: true + enabled: ${HAIRLINK_SWAGGER_ENABLED:true} # 请求前缀 - pathMapping: /dev-api + pathMapping: ${HAIRLINK_SWAGGER_PATH_MAPPING:/dev-api} # 防盗链配置 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: # 过滤开关 - 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/*} diff --git a/ruoyi-admin/src/main/resources/banner.txt b/ruoyi-admin/src/main/resources/banner.txt index 94662592f..d369f11e5 100644 --- a/ruoyi-admin/src/main/resources/banner.txt +++ b/ruoyi-admin/src/main/resources/banner.txt @@ -1,24 +1,30 @@ -Application Version: ${ruoyi.version} +Application Version: ${hairlink.version} Spring Boot Version: ${spring-boot.version} -//////////////////////////////////////////////////////////////////// -// _ooOoo_ // -// o8888888o // -// 88" . "88 // -// (| ^_^ |) // -// O\ = /O // -// ____/`---'\____ // -// .' \\| |// `. // -// / \\||| : |||// \ // -// / _||||| -:- |||||- \ // -// | | \\\ - /// | | // -// | \_| ''\---/'' | | // -// \ .-\__ `-` ___/-. / // -// ___`. .' /--.--\ `. . ___ // -// ."" '< `.___\_<|>_/___.' >'"". // -// | | : `- \`.;`\ _ /`;.`/ - ` : | | // -// \ \ `-. \_ __\ /__ _/ .-` / / // -// ========`-.____`-.___\_____/___.-`____.-'======== // -// `=---=' // -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// 佛祖保佑 永不宕机 永无BUG // -//////////////////////////////////////////////////////////////////// \ No newline at end of file + + ╔═══════════════════════╗ + ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║ + ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║ + ║ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ║ + ╚══╗ ▓▓▓▓▓▓▓▓▓ ╔══╝ + ╲ ▓▓▓▓▓▓▓ ╱ + ╲ ▓▓▓▓▓ ╱ + ╲ ▓▓▓ ╱ + ╲ ▓ ╱ + ╲ ╱ + ╲ ╱ + ╲ ╱ + V + ╱ ╲ + ╱ ╲ + ╱ ╲ + ╱ ░ ╲ + ╱ ░░░ ╲ + ╱ ░░░░░ ╲ + ╱ ░░░░░░░ ╲ + ╔══╝ ░░░░░░░░░ ╚══╗ + ║ ░░░░░░░░░░░░░ ║ + ║ ░░░░░░░░░░░░░░░░░ ║ + ║ ░░░░░░░░░░░░░░░░░░░ ║ + ╚═══════════════════════╝ + + ═══【时 光】═══ diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index d69a57207..f2456ead1 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + @@ -20,7 +20,7 @@ ${log.path}/sys-info.%d{yyyy-MM-dd}.log - 60 + ${HAIRLINK_LOG_MAX_HISTORY:-60} ${log.pattern} @@ -42,7 +42,7 @@ ${log.path}/sys-error.%d{yyyy-MM-dd}.log - 60 + ${HAIRLINK_LOG_MAX_HISTORY:-60} ${log.pattern} @@ -64,7 +64,7 @@ ${log.path}/sys-user.%d{yyyy-MM-dd}.log - 60 + ${HAIRLINK_LOG_MAX_HISTORY:-60} ${log.pattern} diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 6e6b98808..f71e8c74c 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java index eac3da152..1afd5a96c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java @@ -5,11 +5,11 @@ import org.springframework.stereotype.Component; /** * 读取项目相关配置 - * + * * @author ruoyi */ @Component -@ConfigurationProperties(prefix = "ruoyi") +@ConfigurationProperties(prefix = "hairlink") public class RuoYiConfig { /** 项目名称 */ diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index ae1c59c3b..cc18dacdc 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index 031399292..15c437383 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml index 4806634a4..61311fb27 100644 --- a/ruoyi-quartz/pom.xml +++ b/ruoyi-quartz/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index ba8b1a8b6..efff398a8 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -3,7 +3,7 @@ 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"> - ruoyi + hair-link com.ruoyi 3.9.0 diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 18b2a3ed4..1e45be0b0 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = Hair-Link # 开发环境配置 ENV = 'development' -# 若依管理系统/开发环境 +# Hair-Link/开发环境 VUE_APP_BASE_API = '/dev-api' # 路由懒加载 diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index cb064ec84..33d631330 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -1,8 +1,8 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = Hair-Link # 生产环境配置 ENV = 'production' -# 若依管理系统/生产环境 +# Hair-Link/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 5df0cedfc..ee3f8a662 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,8 +1,8 @@ { - "name": "ruoyi", + "name": "hair-link", "version": "3.9.0", - "description": "若依管理系统", - "author": "若依", + "description": "Hair-Link 美发预约管理系统", + "author": "时光", "license": "MIT", "scripts": { "dev": "vue-cli-service serve", @@ -19,10 +19,6 @@ "admin-template", "management-system" ], - "repository": { - "type": "git", - "url": "https://gitee.com/y_project/RuoYi-Vue.git" - }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", "axios": "0.28.1", diff --git a/ruoyi-ui/src/components/RuoYi/Doc/index.vue b/ruoyi-ui/src/components/RuoYi/Doc/index.vue deleted file mode 100644 index cc829b243..000000000 --- a/ruoyi-ui/src/components/RuoYi/Doc/index.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/components/RuoYi/Git/index.vue b/ruoyi-ui/src/components/RuoYi/Git/index.vue deleted file mode 100644 index 517c44865..000000000 --- a/ruoyi-ui/src/components/RuoYi/Git/index.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - \ No newline at end of file diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 1d10b91a0..5f9137087 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -9,14 +9,6 @@ @@ -1062,11 +56,6 @@ export default { // 版本号 version: "3.9.0" } - }, - methods: { - goTarget(href) { - window.open(href, "_blank") - } } } @@ -1134,4 +123,3 @@ export default { } } - diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index f979f68b5..aa298711d 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -56,7 +56,7 @@ diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index a6bfb3b87..1a16d8800 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -7,7 +7,7 @@ function resolve(dir) { 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' // 后端接口 @@ -19,7 +19,7 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口 module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,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" ? "/" : "/", // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', @@ -65,7 +65,7 @@ module.exports = { } }, plugins: [ - // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 + // 使用gzip解压缩静态文件 new CompressionPlugin({ cache: false, // 不启用文件缓存 test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式