Browse Source

fix: 修复参数获取失败

TzuxinChen 2 months ago
parent
commit
e192dd2e0d

+ 3 - 1
.env.example

@@ -6,4 +6,6 @@ DB_PORT=3306
 REDIS_HOST=redis
 REDIS_PORT=6379
 REDIS_PASSWORD=
-REDIS_DATABASE=0
+REDIS_DATABASE=0
+
+PROFILE_PATH=/home/zyc_admin/resource

+ 1 - 1
zyc-admin/src/main/resources/application.yml

@@ -7,7 +7,7 @@ zyc-service:
   # 版权年份
   copyrightYear: 2024
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-  profile: /Users/tzuxin/Code/work/Landian/code/RuoYi-Vue/resource-admin/src/main/resources
+  profile: ${PROFILE_PATH}
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证

+ 1 - 1
zyc-common/src/main/java/com/zyc/common/config/RuoYiConfig.java

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