package org.xyzh.auth;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@EnableDubbo  // 启用 Dubbo 服务
@EnableDiscoveryClient  // 启用 Nacos 服务注册与发现（用于 Gateway 路由）
@ComponentScan(basePackages = {
    "org.xyzh.auth",         // 当前auth模块
    "org.xyzh.common"          // 公共模块
})
public class AuthApp {
    private static final Logger logger = LoggerFactory.getLogger(AuthApp.class);
    
    public static void main(String[] args) {
        logger.info("======================== AuthApp 启动中 =========================");
        SpringApplication.run(AuthApp.class, args);
        logger.info("======================== AuthApp 启动成功 =========================");
    }
}