使用 Spring Boot 从调试模式到生产模式

Debug Mode to Production Mode with SpringBoot

我有一个应用程序 Spring-使用 Vaadin 启动。 我完成了实施,我想将该应用程序投入生产。 当我启动程序时,shell 写下这条消息:

Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.

因此,我想我应该更改 web.xml 文件。但是,问题; Spring,我没有web.xml。因此,如何以另一种方式将 productionMode 设置为 true ? 有人可以帮助我吗?

如果您正在使用 Spring 引导,您可以通过将它们添加到 application.properties 文件来设置大部分(但不是全部)servlet 属性。您可以找到支持的属性 here

vaadin.servlet.resourceCacheTime
vaadin.servlet.productionMode
vaadin.servlet.heartbeatInterval
vaadin.servlet.closeIdleSessions