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;

/**
 * 简化的应用程序启动类
 * 避免复杂的自动配置问题
 */
@SpringBootApplication(
    scanBasePackages = "cn.novalon.gym.manage.app",
    exclude = {ReactiveUserDetailsServiceAutoConfiguration.class}
)
public class SimpleManageApplication {

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

    public static void main(String[] args) {
        logger.info("简化版应用程序启动中...");
        logger.info("包扫描路径: cn.novalon.gym.manage.app");
        
        // 设置系统属性，避免自动配置问题
        System.setProperty("spring.autoconfigure.exclude", 
            "org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration");
        
        SpringApplication.run(SimpleManageApplication.class, args);
        logger.info("简化版应用程序启动完成");
    }
}