> Markdown version of [Vaadin Spring Configuration](https://vaadin.com/docs/v14/flow/integrations/spring/tutorial-spring-configuration). Section index: [llms.txt](https://vaadin.com/docs/v14/flow/llms.txt)

# 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.`.

## <a id="special-configuration-parameters"></a>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.

application.properties

```properties
vaadin.blacklisted-packages=org/bouncycastle,com/my/db/package
```

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

application.properties

```properties
vaadin.whitelisted-packages=com/foo/myapp/ui,com/foo/components
```

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

## <a id="using-spring-boot-properties"></a>Using Spring Boot Properties

You can set properties for Spring Boot in your `application.properties` file.

**Example**: Setting Spring URL mapping in `application.properties`.

```ini
vaadin.urlMapping=/my_mapping/*
```

- By default, URL mapping is `/*`.

> **Note:** 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](https://raw.githubusercontent.com/vaadin/flow-and-components-documentation/master/tutorial-servlet-spring-boot/src/main/java/org/vaadin/tutorial/spring/Application.java) for a example.

## <a id="configuring-spring-mvc-applications"></a>Configuring Spring MVC Applications

If you use [Spring MVC](https://vaadin.com/docs/v14/flow/integrations/spring/tutorial-spring-basic-mvc.md), and therefore the `VaadinMVCWebAppInitializer` subclass, you need to populate your configuration properties yourself.

**Example**: Setting configuration properties in a Spring MVC application.

```java
@Configuration
@ComponentScan
@PropertySource("classpath:application.properties")
public class MyConfiguration {

}
```

- The `application.properties` file is still used, but you can use any name and any property source.

`BDD8E74B-D824-45C7-83F8-F57CFD2FC24B`
