编程知识 cdmana.com

Exception handling -- after the springboot project is started, directly exit process finished with exit code 1

Colleagues are doing SpringBoot When the project starts , There is no error message , The program ends directly

I want to print exception information at this time , Only need to SpringBoot The program entrance of try-catch That's it

As follows :

try {
  SpringApplication.run(Application.class, args);
}catch(Exception e) {
  e.printStackTrace();
}

If this abnormal information has not been printed , Then think about it catch Medium Exception Switch to Throwable try .

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

版权声明
本文为[The blank of writing memory]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224104024008l.html

Scroll to Top