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; } }