zhujie
9 天以前 19428a49b4c07b14097615d48a7a72dbf941c4e7
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());
    }
 
}