/*
 * Main entry point for the pet shop backend application.
 *
 * Author: Harkamal
 * Date: April 2026
 */

package com.petshop.backend;

import com.petshop.backend.config.BusinessProperties;
import com.petshop.backend.config.FlywayContextInitializer;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.data.web.config.EnableSpringDataWebSupport;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableConfigurationProperties(BusinessProperties.class)
@EnableScheduling
@EnableAsync
@EnableSpringDataWebSupport(pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO)
public class BackendApplication {
    public static void main(String[] args) {
        RuntimeClasspathValidator.validate();
        new SpringApplicationBuilder(BackendApplication.class)
                .initializers(new FlywayContextInitializer())
                .run(args);
    }
}
