Production or Debug mode

===========================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

But with SpringBoot we have only java code - no xml files.
So where to do this?

thanks
Jeevan

You can put vaadin.servlet.productionMode=true in your application.properties

-Olli

You can also find other configuration properties here: https://vaadin.com/docs/v8/framework/articles/VaadinSpringTips.html

Olli Tietäväinen:
You can put vaadin.servlet.productionMode=true in your application.properties

-Olli

will it work for Vaadin flow? these properties work for Vaadin8, but not for Vaadin10.

I’m going to point you to the docs on this topic: https://vaadin.com/docs/v10/flow/production/tutorial-production-mode-basic.html

Thank you for reply, i am using spring boot(2.0.5-SNAPSHOT) + vaadin(10.0-SNAPSHOT) dependency. I am getting below error,

Plugin com.vaadin:vaadin-maven-plugin:10.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vaadin:vaadin-maven-plugin:jar:10.0-SNAPSHOT in spring-snapshots (https://repo.spring.io/snapshot)

Shankar SG:
Thank you for reply, i am using spring boot(2.0.5-SNAPSHOT) + vaadin(10.0-SNAPSHOT) dependency. I am getting below error,

Plugin com.vaadin:vaadin-maven-plugin:10.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vaadin:vaadin-maven-plugin:jar:10.0-SNAPSHOT in spring-snapshots (https://repo.spring.io/snapshot)

this is resolved. I ran “$mvn clean package -Pproduction” to build war file but still i can see WARN “Vaadin is running in DEBUG MODE.\nAdd productionMode=true to web.xml to disable debug features.”

You’ll probably need something like this in your pom.xml:

<plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <jvmArguments>-Dvaadin.productionMode</jvmArguments>
                        </configuration>
                    </plugin>

Olli Tietäväinen:
You’ll probably need something like this in your pom.xml:

<plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <jvmArguments>-Dvaadin.productionMode</jvmArguments>
                        </configuration>
                    </plugin>

Yeah, i tried adding this argument, still unable to add productionMode. I have attached demo code, please help me.

===========================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.

17243493.zip (8.27 KB)

It is working with below properties in application.properties file,

vaadin.productionMode=true

vaadin.heartbeatInterval=300

vaadin.closeIdleSessions=true

Olli Tietäväinen:
You can put vaadin.servlet.productionMode=true in your application.properties

-Olli

it seems this property has been changed to vaadin.productionMode=true in Vaadin flow. It is working for me.

Great!