package com.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableFeignClients
@EnableScheduling
@EnableCaching
@RestController
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class Application {

    public static void main(String[] args) {
        //allow-bean-definition-overriding: true
        SpringApplication springApplication = new SpringApplication(Application.class);
        springApplication.setAllowBeanDefinitionOverriding(true);
        springApplication.run(args);
        //SpringApplication.run(Application.class, args);
    }

    @GetMapping("/")
    public ResponseEntity index() {
        return ResponseEntity.ok(null);
    }

    @GetMapping("/csrf")
    public ResponseEntity csrf() {
        return ResponseEntity.ok(null);
    }

}
