I have blocker issue "Close this "ConfigurableApplicationContext"" in main method
public static void main(String[] args)
{
SpringApplication.run(MyApplication.class, args);
}
I've tried code from SonarQube example
public static void main(String[] args)
{
ConfigurableApplicationContext context = null;
try
{
context = SpringApplication.run(MyApplication.class, args);
}
finally
{
if (context != null) {
context.close();
}
}
}
but it closes the context right after starting.
How to fix this issue?