package com.haha.common.config;

import com.haha.common.interceptor.RequestLogInterceptor;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@EnableConfigurationProperties(LogProperties.class)
@ConfigurationProperties(prefix = "haha.common")
public class CommonConfig {
    
    private String imageDomainPrefix = "https://img.hahabianli.com/";

    @Bean
    public RequestLogInterceptor requestLogInterceptor(LogProperties logProperties) {
        return new RequestLogInterceptor(logProperties);
    }
}
