【问题标题】:Spring Boot - Rest Controller fails after hot swapSpring Boot - 热插拔后 Rest Controller 失败
【发布时间】:2017-03-27 19:44:13
【问题描述】:

我正在使用带有 devtools 的 Spring Boot 1.4.1 并在 IntelliJ 14.1 中运行它 除了热插拔外,一切都很好。我对控制器的更改是热交换的,我可以看到应用程序正在重新加载。然而,它会导致错误并且控制器变得不可用(404)。 重启应用后一切正常。

任何想法我做错了什么?

提前感谢您的帮助 爱德华

【问题讨论】:

  • 你能发布你得到的堆栈跟踪吗?
  • 谢谢 Morfic,您提供的链接有帮助。为了他人的利益,我会更新问题

标签: intellij-idea spring-boot


【解决方案1】:

为了回答我的问题,通过将以下内容添加到 application.properties 来解决问题

## Amount of time (in milliseconds) to wait between polling for classpath changes.
spring.devtools.restart.poll-interval=3000

# Amount of quiet time (in milliseconds) required without any classpath changes before a restart is triggered.
spring.devtools.restart.quiet-period=2999

【讨论】:

    猜你喜欢
    • 2014-02-19
    • 2016-05-14
    • 2016-01-22
    • 2018-10-07
    • 1970-01-01
    • 2017-02-24
    • 1970-01-01
    • 2016-03-25
    相关资源
    最近更新 更多