This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.

Application Property Implementation

Application properties are used to configure an installation. Each customer module contains an file that can be used to override the default properties. These files are located under path/to/nice2/customer/CUSTOMER_NAME/src/main/resources.

Application properties can be overwritten in a file application-{profile}.properties also located in the same directory. This can be useful to test something locally or if the properties are sensitive (e.g. usernames and passwords). An application-{profile}.properties file is ignored by git (.gitignore) and must be created manually.


The {profile} refers to the currently active spring profile (current Nice run environment), for example

Application properties can be injected into any spring component.

Injecting properties

Properties can be injected into a setter method or directly into a private field:

private int idleTimeoutSeconds;
public void setTrigramSimilarity(double trigramSimilarity) {
    this.trigramSimilarity = trigramSimilarity;

Default Values

Default values can be stored in an additional *.properties file per module. The additional file needs to be registered in the @Configuration class:

public class CalendarConfiguration extends AbstractConfiguration {