package com.libreecm.input;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;

import com.libreecm.commonAPI.configuration.ComponentConfig;
import com.libreecm.commonAPI.model.objects.Uri;
import com.libreecm.input.auxiliars.RepositoryCreator;

@SpringBootApplication
public class Application extends SpringBootServletInitializer {

	//private static final Logger log = LoggerFactory.getLogger(Application.class);
		
	@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  			return application.sources(Application.class); 
    }
	
    public static void main(String[] args) {
      SpringApplication.run(Application.class, args);
    }

    @Bean
    public EmbeddedServletContainerCustomizer containerCustomizer() {
        return (container -> { 
            container.setPort(ComponentConfig.getConfig().getLibreECMInputLocalPort());
        });
    }
    
    @Bean
	public CommandLineRunner demo1() {
    	return (args) -> {};
	}
    

    @Bean
	public CommandLineRunner demo4() {
		return (args) -> {	
		};
	}
	

    @Bean
	public CommandLineRunner demo5() {
		return (args) -> {};
	}
	
	@Bean
	public CommandLineRunner demo6() {
		return (args) -> {};
	}
}


