Example usage for org.springframework.boot.context.properties.source ConfigurationPropertyNameAliases ConfigurationPropertyNameAliases

List of usage examples for org.springframework.boot.context.properties.source ConfigurationPropertyNameAliases ConfigurationPropertyNameAliases

Introduction

In this page you can find the example usage for org.springframework.boot.context.properties.source ConfigurationPropertyNameAliases ConfigurationPropertyNameAliases.

Prototype

public ConfigurationPropertyNameAliases() 

Source Link

Usage

From source file:org.springframework.boot.jdbc.DataSourceBuilder.java

private void bind(DataSource result) {
    ConfigurationPropertySource source = new MapConfigurationPropertySource(this.properties);
    ConfigurationPropertyNameAliases aliases = new ConfigurationPropertyNameAliases();
    aliases.addAliases("url", "jdbc-url");
    aliases.addAliases("username", "user");
    Binder binder = new Binder(source.withAliases(aliases));
    binder.bind(ConfigurationPropertyName.EMPTY, Bindable.ofInstance(result));
}