org.springframework.boot.context.properties.source.ConfigurationPropertyNameAliases Java Examples
The following examples show how to use
org.springframework.boot.context.properties.source.ConfigurationPropertyNameAliases.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XADataSourceBuilder.java From teiid-spring-boot with Apache License 2.0 | 5 votes |
private void bindXaProperties(Bindable<XADataSource> target) { ConfigurationPropertySource source = new MapConfigurationPropertySource( this.properties); ConfigurationPropertyNameAliases aliases = new ConfigurationPropertyNameAliases(); aliases.addAliases("url", "jdbc-url"); aliases.addAliases("username", "user"); aliases.addAliases("portNumber", "port"); aliases.addAliases("serverName", "server"); aliases.addAliases("databaseName", "database"); Binder binder = new Binder(source.withAliases(aliases)); binder.bind(ConfigurationPropertyName.EMPTY, target); }
Example #2
Source File: DataSourceSpiBuilder.java From ByteJTA with GNU Lesser General Public License v3.0 | 5 votes |
private void bind(XADataSource 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)); }
Example #3
Source File: DataSourceCciBuilder.java From ByteJTA with GNU Lesser General Public License v3.0 | 4 votes |
private void bind(DataSource dataSource) { ConfigurationPropertySource source = new MapConfigurationPropertySource(this.properties); ConfigurationPropertyNameAliases aliases = new ConfigurationPropertyNameAliases(); Binder binder = new Binder(source.withAliases(aliases)); binder.bind(ConfigurationPropertyName.EMPTY, Bindable.ofInstance(dataSource)); }