package com.devjob.application;

import com.devjob.common.exception.GlobalExceptionHandler;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * EP08: 시즌1 모놀리스에서 지원(Application) 도메인을 분리한 서비스.
 * Application.userId / Application.jobId는 Long 참조이며, 실제 회원/공고 정보가
 * 필요하면 devjob-job을 호출한다.
 *
 * Spring Boot 4 / Spring Cloud 2025.1: devjob-job 호출은 @HttpExchange
 * ({@link com.devjob.application.config.HttpClientConfig})로 전환.
 * devjob-notification / devjob-user는 @HttpExchange(@ImportHttpServices) 유지.
 *
 * EP26: {@code @EnableAsync} - ApplicationAppliedEventListener가 비동기로
 * 알림을 발송할 수 있도록 활성화한다.
 */
@SpringBootApplication
@EnableJpaAuditing
@EnableAsync
@Import(GlobalExceptionHandler.class)
public class ApplicationServiceApplication {

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