fix(cert): 修复证书文件路径问题
- 移除了上传路径末尾的斜杠 - 更新了证书路径相关的文档和脚本 - 调整了开发和生产环境配置中的上传路径
This commit is contained in:
@@ -136,7 +136,7 @@ public Config createDefaultDevConfig() {
|
|||||||
**示例**:
|
**示例**:
|
||||||
- 配置文件upload-path: `/www/wwwroot/file.ws/`
|
- 配置文件upload-path: `/www/wwwroot/file.ws/`
|
||||||
- 数据库相对路径: `wechat/10550/apiclient_key.pem`
|
- 数据库相对路径: `wechat/10550/apiclient_key.pem`
|
||||||
- 最终证书路径: `/www/wwwroot/file.ws/file/wechat/10550/apiclient_key.pem`
|
- 最终证书路径: `/www/wwwroot/file.ws/wechat/10550/apiclient_key.pem`
|
||||||
|
|
||||||
## 证书文件验证
|
## 证书文件验证
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
package com.gxwebsoft.hjm.controller;
|
package com.gxwebsoft.hjm.controller;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||||
import com.gxwebsoft.common.core.utils.FileServerUtil;
|
import com.gxwebsoft.common.core.utils.FileServerUtil;
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
|
||||||
import com.gxwebsoft.hjm.service.HjmBxLogService;
|
import com.gxwebsoft.hjm.service.HjmBxLogService;
|
||||||
import com.gxwebsoft.hjm.entity.HjmBxLog;
|
import com.gxwebsoft.hjm.entity.HjmBxLog;
|
||||||
import com.gxwebsoft.hjm.param.HjmBxLogParam;
|
import com.gxwebsoft.hjm.param.HjmBxLogParam;
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
import com.gxwebsoft.common.core.web.PageParam;
|
|
||||||
import com.gxwebsoft.common.core.web.BatchParam;
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
@@ -168,7 +164,7 @@ public class HjmBxLogController extends BaseController {
|
|||||||
* 文件上传位置(服务器)
|
* 文件上传位置(服务器)
|
||||||
*/
|
*/
|
||||||
private String getUploadDir() {
|
private String getUploadDir() {
|
||||||
return config.getUploadPath() + "file/";
|
return config.getUploadPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ mqtt:
|
|||||||
config:
|
config:
|
||||||
# 开发环境接口
|
# 开发环境接口
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
upload-path: /Users/gxwebsoft/JAVA/mp-java/src/main/resources/ # window(D:\Temp)
|
upload-path: /Users/gxwebsoft/JAVA/mp-java/src/main/resources # window(D:\Temp)
|
||||||
|
|
||||||
# JWT配置
|
# JWT配置
|
||||||
jwt:
|
jwt:
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ config:
|
|||||||
file-server: https://file-s209.shoplnk.cn
|
file-server: https://file-s209.shoplnk.cn
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
upload-path: /www/wwwroot/file.ws/
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ config:
|
|||||||
file-server: https://file.websoft.top
|
file-server: https://file.websoft.top
|
||||||
# 其他
|
# 其他
|
||||||
api-url: https://server.websoft.top/api
|
api-url: https://server.websoft.top/api
|
||||||
upload-path: /Users/gxwebsoft/Documents/uploads/
|
upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
local-upload-path: /Users/gxwebsoft/Documents/uploads/
|
local-upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ echo "=== 检查证书文件路径 ==="
|
|||||||
|
|
||||||
# 基础路径
|
# 基础路径
|
||||||
CERT_ROOT="/www/wwwroot/file.ws"
|
CERT_ROOT="/www/wwwroot/file.ws"
|
||||||
FILE_BASE="$CERT_ROOT/file"
|
FILE_BASE="$CERT_ROOT"
|
||||||
|
|
||||||
echo "证书根路径: $CERT_ROOT"
|
echo "证书根路径: $CERT_ROOT"
|
||||||
echo "文件基础路径: $FILE_BASE"
|
echo "文件基础路径: $FILE_BASE"
|
||||||
@@ -45,7 +45,7 @@ echo "=== 查找所有.p12文件 ==="
|
|||||||
find "$CERT_ROOT" -name "*.p12" -type f 2>/dev/null | head -20
|
find "$CERT_ROOT" -name "*.p12" -type f 2>/dev/null | head -20
|
||||||
|
|
||||||
# 检查特定文件
|
# 检查特定文件
|
||||||
SPECIFIC_FILE="/www/wwwroot/file.ws/file/20250727/c27fe16e08314431a56c3489818af64f.pem"
|
SPECIFIC_FILE="/www/wwwroot/file.ws/20250727/c27fe16e08314431a56c3489818af64f.pem"
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 检查特定文件 ==="
|
echo "=== 检查特定文件 ==="
|
||||||
echo "文件路径: $SPECIFIC_FILE"
|
echo "文件路径: $SPECIFIC_FILE"
|
||||||
@@ -54,7 +54,7 @@ if [ -f "$SPECIFIC_FILE" ]; then
|
|||||||
echo "文件大小: $(stat -c%s "$SPECIFIC_FILE") bytes"
|
echo "文件大小: $(stat -c%s "$SPECIFIC_FILE") bytes"
|
||||||
echo "文件权限: $(stat -c%A "$SPECIFIC_FILE")"
|
echo "文件权限: $(stat -c%A "$SPECIFIC_FILE")"
|
||||||
echo "文件所有者: $(stat -c%U:%G "$SPECIFIC_FILE")"
|
echo "文件所有者: $(stat -c%U:%G "$SPECIFIC_FILE")"
|
||||||
|
|
||||||
# 检查文件内容
|
# 检查文件内容
|
||||||
echo ""
|
echo ""
|
||||||
echo "文件前3行:"
|
echo "文件前3行:"
|
||||||
|
|||||||
Reference in New Issue
Block a user