Commit 9e9eb2d2 authored by mkodavati's avatar mkodavati

removed playground application

parent fe909bcc
/*******************************************************************************
* Copyright (C) Altimetrik 2018. All rights reserved.
*
* This software is the confidential and proprietary information
* of Altimetrik. You shall not disclose such Confidential Information
* and shall use it only in accordance with the terms and conditions
* entered into with Altimetrik.
******************************************************************************/
package com.altimetrik.playground.innovation;
import java.io.File;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource;
import org.togglz.core.manager.EnumBasedFeatureProvider;
import org.togglz.core.repository.StateRepository;
import org.togglz.core.repository.file.FileBasedStateRepository;
import org.togglz.core.spi.FeatureProvider;
import org.togglz.core.user.NoOpUserProvider;
import org.togglz.core.user.UserProvider;
import com.altimetrik.playground.innovation.feature.Features;
import com.altimetrik.playground.innovation.properties.ErrorProperties;
import com.altimetrik.playground.innovation.properties.ServiceProperties;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@ServletComponentScan
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableHystrixDashboard
@PropertySource(value = { "classpath:db-config.properties", "classpath:service.properties" })
@EnableConfigurationProperties({ ServiceProperties.class, ErrorProperties.class })
public class PlaygroundApplication {
public static void main(String[] args) {
SpringApplication.run(PlaygroundApplication.class, args);
}
@Bean
public FeatureProvider featureProvider() {
return new EnumBasedFeatureProvider(Features.class);
}
@Bean
public UserProvider userProvider() {
return new NoOpUserProvider();
}
@Bean
public StateRepository getStateRepository() {
return new FileBasedStateRepository(new File("src/main/resources/features.properties"), 10_000);
}
@Bean
public Gson gson() {
return new GsonBuilder().serializeNulls().create();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment