package com.uas.eis;

import com.uas.eis.core.config.DataSourceProperties;
import com.uas.eis.core.config.DynamicDataSourceRegister;
import com.uas.eis.core.support.TokenPropertiesListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableCaching
@EnableScheduling
@Import({DynamicDataSourceRegister.class})
@EnableConfigurationProperties(DataSourceProperties.class)
public class UasEisApplication {
	public static void main(String[] args) {
		SpringApplication application = new SpringApplication(UasEisApplication.class);
		application.addListeners(new TokenPropertiesListener("token.properties"));
		//application.addListeners(new TokenPropertiesListener("api_sign_key_mapping.properties"));
		application.run(args);
	}
	
}
