All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bq.corbel.evci.EvciRunner Maven / Gradle / Ivy

There is a newer version: 1.35.0
Show newest version
package com.bq.corbel.evci;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.bq.corbel.evci.ioc.EvciIoc;

/**
 * Created by Alberto J. Rubio
 */
public class EvciRunner {

	private static final Logger LOG = LoggerFactory.getLogger(EvciRunner.class);

	public static void main(String[] args) {
		try {
			System.setProperty("conf.namespace", "evci");
			ApplicationContext context = new AnnotationConfigApplicationContext(EvciIoc.class);
			boolean restEnabled = context.getEnvironment().getProperty("evci.rest.enabled", Boolean.class);
			if (restEnabled) {
				LOG.info("Starting EVCI REST api.");
				new EvciService(context).run(args);
			}
		} catch (Exception e) {
			LOG.error("Unable to start evci", e);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy