com.orange.cepheus.cep.Application.java Source code

Java tutorial

Introduction

Here is the source code for com.orange.cepheus.cep.Application.java

Source

/*
 * Copyright (C) 2015 Orange
 *
 * This software is distributed under the terms and conditions of the 'GNU GENERAL PUBLIC LICENSE
 * Version 2' license which can be found in the file 'LICENSE.txt' in this package distribution or
 * at 'http://www.gnu.org/licenses/gpl-2.0-standalone.html'.
 */

package com.orange.cepheus.cep;

import com.orange.cepheus.cep.persistence.JsonPersistence;
import com.orange.cepheus.cep.persistence.Persistence;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

@SpringBootApplication
@ComponentScan("com.orange")
@EnableScheduling
public class Application {

    public static void main(String[] args) {
        new SpringApplicationBuilder().sources(Application.class).showBanner(false).run(args);
    }

    @Bean
    public TaskScheduler taskScheduler() {
        return new ThreadPoolTaskScheduler();
    }

    @Bean
    public Persistence persistence() {
        return new JsonPersistence();
    }
}