hilla icon indicating copy to clipboard operation
hilla copied to clipboard

vaadin.productionMode=true/false from application.properties in Vaadin 15

Open vlipovetskii opened this issue 5 years ago • 5 comments

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

vlipovetskii avatar Apr 20 '20 11:04 vlipovetskii

Thanks for the ticket @vlipovetskii. I'll move it to the Flow team for investigations.

juhopiirainen avatar Apr 20 '20 11:04 juhopiirainen

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.

haijian-vaadin avatar Apr 22 '20 06:04 haijian-vaadin

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 avatar Apr 22 '20 09:04 vlipovetskii

@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.

vlukashov avatar Apr 29 '20 13:04 vlukashov

I think it's related to this ticket vaadin/hilla#343.

haijian-vaadin avatar May 04 '20 22:05 haijian-vaadin