package cn.novalon.gym.manage.app;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.r2dbc.repository.config.EnableR2dbcRepositories;

@SpringBootApplication(scanBasePackages = "cn.novalon.gym.manage", exclude = {ReactiveUserDetailsServiceAutoConfiguration.class})
@EnableR2dbcRepositories(basePackages = {"cn.novalon.gym.manage.db.dao", "cn.novalon.gym.manage.sys.audit.repository"})
public class ManageApplication {

    private static final Logger logger = LoggerFactory.getLogger(ManageApplication.class);

    public static void main(String[] args) {
        logger.info("应用程序启动中...");
        logger.info("包扫描路径: cn.novalon.gym.manage");
        
        // 使用简单的启动方式，避免自动配置问题
        SpringApplication.run(ManageApplication.class, args);
        logger.info("应用程序启动完成");
    }
}
