Commit ed6f11d6 authored by Phillip Webb's avatar Phillip Webb

Polish

parent ec4c8bf5
...@@ -83,10 +83,8 @@ public class DataSourceBuilder { ...@@ -83,10 +83,8 @@ public class DataSourceBuilder {
private void bind(DataSource result) { private void bind(DataSource result) {
MutablePropertyValues properties = new MutablePropertyValues(this.properties); MutablePropertyValues properties = new MutablePropertyValues(this.properties);
new RelaxedDataBinder(result) new RelaxedDataBinder(result).withAlias("url", "jdbcUrl")
.withAlias("url", "jdbcUrl") .withAlias("username", "user").bind(properties);
.withAlias("username", "user")
.bind(properties);
} }
public DataSourceBuilder type(Class<? extends DataSource> type) { public DataSourceBuilder type(Class<? extends DataSource> type) {
......
...@@ -76,7 +76,6 @@ public class AbstractDevToolsDataSourceAutoConfigurationTests { ...@@ -76,7 +76,6 @@ public class AbstractDevToolsDataSourceAutoConfigurationTests {
@Test @Test
public void emptyFactoryMethodMetadataIgnored() { public void emptyFactoryMethodMetadataIgnored() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
DataSource dataSource = mock(DataSource.class); DataSource dataSource = mock(DataSource.class);
AnnotatedGenericBeanDefinition beanDefinition = new AnnotatedGenericBeanDefinition( AnnotatedGenericBeanDefinition beanDefinition = new AnnotatedGenericBeanDefinition(
dataSource.getClass()); dataSource.getClass());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment