update 接口测试完成,新增ip限制链接 + 最大连接数配置.文件上传模块,路径修改

This commit is contained in:
yyb
2025-04-16 16:15:53 +08:00
parent 476cb6711e
commit 2d8088c6cb
24 changed files with 313 additions and 106 deletions

View File

@@ -1,12 +1,13 @@
package com.m2pool.file.config;
import java.io.File;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.io.File;
/**
* 通用映射配置
*
@@ -18,7 +19,7 @@ public class ResourcesConfig implements WebMvcConfigurer
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
@Value("${file.filepath}")
private String localFilePath;
/**

View File

@@ -32,7 +32,7 @@ public class SysFileController
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
@Value("${file.filepath}")
private String localFilePath;
/**

View File

@@ -20,7 +20,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
/**
* 资源映射路径 前缀
*/
@Value("${file.prefix}")
@Value("${file.prefix")
public String localFilePrefix;
/**
@@ -32,7 +32,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
@Value("${file.filepath}")
private String localFilePath;
/**

View File

@@ -0,0 +1,30 @@
# Tomcat
server:
port: 9300
# Spring
spring:
application:
# 应用名称
name: m2pool-file
profiles:
# 环境配置
active: test
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8808
config:
# 配置中心地址
server-addr: 127.0.0.1:8808
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
file:
domain: https://www.m2pool.com
path: /var/www/html/web
img: /img
filepath: /home/ubuntu/prod

View File

@@ -0,0 +1,28 @@
# Tomcat
server:
port: 9300
# Spring
spring:
application:
# 应用名称
name: m2pool-file
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
file:
domain: https://www.m2pool.com
path: /var/www/html/web-test
# img: /img
filepath: /home/ubuntu/web

View File

@@ -1,25 +1,3 @@
# Tomcat
server:
port: 9300
# Spring
spring:
application:
# 应用名称
name: m2pool-file
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8808
config:
# 配置中心地址
server-addr: 127.0.0.1:8808
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
active: test