tlias管理系统--阿里云参数配置化&yml配置文件介绍

This commit is contained in:
2025-11-30 11:06:26 +08:00
parent 95136e659d
commit 74c0786916
2 changed files with 5 additions and 33 deletions

View File

@@ -21,16 +21,16 @@ import java.util.UUID;
@Component
public class AliOSSUtils {
/*@Value("${aliyun.oss.endpoint}")
@Value("${aliyun.oss.endpoint}")
private String endpoint;
@Value("${aliyun.oss.bucketName}")
private String bucketName;
@Value("${aliyun.oss.region}")
private String region ;*/
private String region ;
private String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
private String bucketName = "inmind-test1";
private String region = "cn-hangzhou";
// private String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
// private String bucketName = "inmind-test1";
// private String region = "cn-hangzhou";
/**
* 实现上传图片到OSS

View File

@@ -1,28 +0,0 @@
# 应用服务 WEB 访问端口
server.port=8080
#下面这些内容是为了让MyBatis映射
#指定Mybatis的Mapper文件
mybatis.mapper-locations=classpath:mappers/*xml
#指定Mybatis的实体目录
mybatis.type-aliases-package=com.inmind.mybatis.entity
#驱动类名称
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#数据库连接的url
spring.datasource.url=jdbc:mysql://localhost:3306/tlias2
#连接数据库的用户名
spring.datasource.username=root
#连接数据库的密码
spring.datasource.password=1234
#输出mybatis的日志
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#mybatis 驼峰自动映射
mybatis.configuration.map-underscore-to-camel-case=true
#文件上传配置
#单个文件上传的大小限制
spring.servlet.multipart.max-file-size=10MB
#一次请求文件上传的大小限制
spring.servlet.multipart.max-request-size=100MB