Files
smartDriveEE/src/main/java/com/rj/config/AliyunConfig.java
2025-10-24 10:41:48 +08:00

65 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.rj.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* 阿里云配置类
*
* @author rj
* @date 2025-01-22
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "aliyun")
public class AliyunConfig {
/**
* 阿里云API Key
*/
private String apiKey;
/**
* 阿里云区域
*/
private String region = "cn-beijing";
/**
* 是否启用阿里云服务
*/
private boolean enabled = true;
/**
* API配置
*/
private ApiConfig api = new ApiConfig();
@Data
public static class ApiConfig {
/**
* 连接超时时间(毫秒)
*/
private int connectTimeout = 60000;
/**
* 读取超时时间(毫秒)
*/
private int readTimeout = 300000;
/**
* 最大重试次数
*/
private int maxRetries = 5;
/**
* 重试延迟时间(毫秒)
*/
private int retryDelay = 3000;
/**
* URL访问测试超时毫秒
*/
private int urlTestTimeout = 10000;
}
}