Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vlipovetskii opened this issue Apr 20, 2020 · 5 comments

Comments

@vlipovetskii
Copy link

vlipovetskii commented Apr 20, 2020

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

@juhopiirainen
Copy link

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

@juhopiirainen juhopiirainen transferred this issue from vaadin/platform Apr 20, 2020
@caalador caalador added the hilla Issues related to Hilla label Apr 21, 2020
@haijian-vaadin
Copy link
Contributor

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.

@vlipovetskii
Copy link
Author

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.

@vlukashov
Copy link

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

@haijian-vaadin
Copy link
Contributor

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

@vaadin-bot vaadin-bot transferred this issue from vaadin/flow Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants