@ConfigurationProperties

From NovaOrdis Knowledge Base
Revision as of 22:02, 21 November 2018 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

@ConfigurationProperties is an annotation that, once placed on a bean, specifies that the properties of that bean ban be injected from properties present in the Spring environment.

@Component
@ConfigurationProperties(prefix = "playground.spring.pi")
public class ... {
}

The 'prefix' attribute defines the namespace for the configuration properties exposed by the component.