package de.cannamanage.api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.persistence.autoconfigure.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * CannaManage Spring Boot application entry point.
 * Sprint 2: REST API + Spring Security + OpenAPI.
 *
 * Multi-module scanning:
 * - scanBasePackages: component scanning (controllers, services)
 * - EnableJpaRepositories: Spring Data JPA repository interfaces
 * - EntityScan: JPA entity detection across modules (Boot 4.0 relocated package)
 */
@SpringBootApplication(scanBasePackages = "de.cannamanage")
@EnableJpaRepositories(basePackages = "de.cannamanage.service.repository")
@EntityScan(basePackages = "de.cannamanage.domain.entity")
public class CannaManageApplication {

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