hilla
hilla copied to clipboard
vaadin.productionMode=true/false from application.properties in Vaadin 15
Vaadin 14 supported setting vaadin.productionMode=true/false in application.properties https://vaadin.com/docs/v14/flow/spring/tutorial-spring-configuration.html
Vaadin 15 ignores vaadin.productionMode in application.properties
Thanks for the ticket @vlipovetskii. I'll move it to the Flow team for investigations.
Hi @vlipovetskii, glad to hear that you are trying out Vaadin 15 and thanks for the feedback.
In Vaadin 14 and 15, the recommended way to enable production mode is to use a production mode maven profile, as described in this doc,
Just setting the vaadin.productionMode=true won't really enable the production mode, I think it's the same in Vaadin 14.
test vaadin 15 spring boot applcation starts correctly in production mode if I set in JVM settings -Dvaadin.productionMode=true, and does not start if vaadin.productionMode=true is set in application.properties.
Before with Vaadin 14, it worked even if setting had been setup in application.settings.
@vlipovetskii, can you please share two minimal projects - one with V14 and another with V15 that show the issue? I am probably missing something in your description because I do not see how a switch between the production and the development modes can be done by only flipping a single property.
To my knowledge, the switching to the production mode requires both setting the vaadin.productionMode=true property, and also running the build-frontend goal of vaadin-maven-plugin during the build. And that why Vaadin recommends to do it with a Maven profile, as described in the docs page @haijian-vaadin has linked to above.
I think it's related to this ticket vaadin/hilla#343.