package com.njcn.product;

import com.njcn.web.advice.ResponseAdvice;
import com.njcn.web.config.FeignConfig;
import com.njcn.web.exception.GlobalBusinessExceptionHandler;
import com.njcn.web.service.ILogService;
import com.njcn.web.service.impl.LogServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.FilterType;

@Slf4j
@DependsOn("proxyMapperRegister")
@SpringBootApplication(scanBasePackages = "com.njcn")
@MapperScan("com.njcn.**.mapper")
@ComponentScan(
        basePackages = "com.njcn",
        excludeFilters = @ComponentScan.Filter(
                type = FilterType.ASSIGNABLE_TYPE,
                classes ={ FeignConfig.class, ILogService.class, GlobalBusinessExceptionHandler.class, ResponseAdvice.class}
        )
)
public class CarryCapacityApplication {

    public static void main(String[] args) {
        SpringApplication.run(CarryCapacityApplication.class, args);
    }

}
