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