tj
2025-04-11 f71719bf3e2b433b790cfaa83265611faf1f1a1c
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());
    }
 
}