package com.sonic.cow.config;

import com.volcengine.service.visual.IVisualService;
import com.volcengine.service.visual.impl.VisualServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class IVisualServiceConfig {

    @Value("${volcengine.cnAccessKey}")
    private String accessKey;

    @Value("${volcengine.cnSecretKey}")
    private String secretKey;

    @Bean
    public IVisualService visualService() {
        IVisualService visualService = VisualServiceImpl.getInstance();
        visualService.setAccessKey(accessKey);
        visualService.setSecretKey(secretKey);
        return visualService;
    }

}
