Documentation versions (currently viewingVaadin 14)

You are viewing documentation for an older Vaadin version. View latest documentation

Vaadin Spring Configuration

You can use many properties to configure your Vaadin application. See, for example, the com.vaadin.server.DeploymentConfiguration and com.vaadin.server.Constants classes for the numerous property names. In addition to these properties, you can also set Spring properties as system properties. Spring configuration properties have the same names, but are prefixed with vaadin..

Special configuration parameters

blacklisted-packages is a comma separated string that can be used to blacklist packages from getting scanned in v14 (npm mode) projects. As the default set of packages doesn’t cover everything that we shouldn’t be interested in.


whitelisted-packages is a comma separated string that can be used to specify the only packages that need to be scanned for UI components and views. In order to improve the performance during development, it’s recommended to set this property especially in big applications. Note that com/vaadin/flow/component is implicitly included and is always scanned.

You should use either whitelisted-packages or blacklisted-packages. In case both of them have values, blacklisted-packages will be ignored.

Using Spring Boot Properties

You can set properties for Spring Boot in your file.

Example: Setting Spring URL mapping in

  • By default, URL mapping is /*.

An additional servlet, such as /my_mapping/*, is required to handle the frontend resources for non-root servlets. The servlet can be defined in your application class. See this Application class for a example.

Configuring Spring MVC Applications

If you use Spring MVC, and therefore the VaadinMVCWebAppInitializer subclass, you need to populate your configuration properties yourself.

Example: Setting configuration properties in a Spring MVC application.

public class MyConfiguration {

  • The file is still used, but you can use any name and any property source.