tj
2025-04-17 15ea9064ecdfbb9c90a1e5123f2f60e0e94c5b9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.mzl.flower.config.oss;
 
import com.volcengine.tos.TOSV2;
import com.volcengine.tos.TOSV2ClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
import javax.annotation.Resource;
 
@Configuration
public class TosClientConfig {
 
    @Resource
    private TosOssProperties properties;
 
    @Bean
    public TOSV2 tosClient() {
        return new TOSV2ClientBuilder().build(properties.getRegion(), properties.getEndpoint(), properties.getKeyid(), properties.getKeysecret());
    }
 
}