Java Spring Boot 请求:“在启用‘调试’的情况下重新运行您的应用程序” - 我该怎么做?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51225325/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 00:01:37  来源:igfitidea点击:

Spring Boot requests: to "re-run your application with 'debug' enabled" - how do I?

javaspringspring-boot

提问by Oren Bochman

I am getting a myriad of exceptions trying to run my spring boot project in Eclipse. What they have in common is a "re-run your application with 'debug' enabled" How exactly is this done?

尝试在 Eclipse 中运行我的 Spring Boot 项目时,我遇到了无数异常。它们的共同点是“在启用'调试'的情况下重新运行您的应用程序”这是如何完成的?

  • A maven setting ?
  • Use the debugger ?
  • A command line argument ?
  • A vm argument ?
  • A spring application settings ?
  • 一个 Maven 设置?
  • 使用调试器?
  • 命令行参数 ?
  • 虚拟机参数?
  • 一个 spring 应用程序设置?

I tried a few to no avail. Your assistance much appreciated!

我试了几次都没有用。非常感谢您的帮助!

采纳答案by Joe Doe

Adding the following line

添加以下行

debug=true

debug=true

to the application.propertiesor application.yml, file should help. You'll get more detailed logging. Generally, if you want to see more fine-grained log messages from all members of a given package, you can set that by adding a line such as

application.propertiesor application.yml,文件应该有帮助。您将获得更详细的日志记录。通常,如果您想查看来自给定包的所有成员的更细粒度的日志消息,您可以通过添加一行来设置它,例如

logging.level.<package_name>=<LOGGING_LEVEL>

logging.level.<package_name>=<LOGGING_LEVEL>

for example:

例如:

logging.level.org.springframework.context=DEBUG

logging.level.org.springframework.context=DEBUG

These log messages may be helpful to find the core of the problem (in this case why a given exception was thrown)

这些日志消息可能有助于找到问题的核心(在这种情况下,为什么会抛出给定的异常)