package com.retdata.yaoyibi.config;

import com.retdata.yaoyibi.mapper.WmScorePackageMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@ComponentScan(basePackages = "com.retdata.yaoyibi")
@MapperScan(basePackageClasses = WmScorePackageMapper.class)
public class MainConfig {

    @Bean
    public GroupedOpenApi yaoyibiApi() {
        String[] packagedToMatch = {"com.retdata.yaoyibi.web"};
        return GroupedOpenApi.builder().group("yaoyibi")
                .displayName("要易云BI后端接口")
                .packagesToScan(packagedToMatch).build();
    }

}
