<file_sep>package com.swagger;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;


@RestController
public class CheckSwagger {

//    @RequestMapping("/hi")
    @PostMapping("/hi")
    public String hi() {
        return "hi";
    }

    @RequestMapping(value = "/custom", method = RequestMethod.POST)
    public String custom() {
        return "custom";
    }
}
<file_sep>package com.swagger;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }


    @Bean
    public CommandLineRunner showStatus(ApplicationContext ctx) {

        return args -> {
            System.out.println("CHECK STATUS OF APPLICATION CONTEXT");

            String[] beanName = ctx.getBeanDefinitionNames();

            for (String str : beanName) {
                System.out.println("BEAN NAME:" + str);
            }
        };
    }
}
