package com.kt.event.content.infra;

import com.kt.event.common.security.JwtAuthenticationFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * Content Service Application
 * Phase 3: JPA removed, using Redis for storage
 */
@SpringBootApplication(scanBasePackages = {
        "com.kt.event.content",
        "com.kt.event.common"
})
@ComponentScan(
        basePackages = {
                "com.kt.event.content",
                "com.kt.event.common"
        },
        excludeFilters = @ComponentScan.Filter(
                type = FilterType.ASSIGNABLE_TYPE,
                classes = JwtAuthenticationFilter.class
        )
)
@EnableAsync
@EnableFeignClients(basePackages = "com.kt.event.content.infra.gateway.client")
public class ContentApplication {

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