Commit db50fb87 authored by Andy Wilkinson's avatar Andy Wilkinson

Remove redundant metadata for JOOQ’s SQL dialect

Also add a test that I’d written before Phil fixed the problem in
5dbe6232.

See gh-3468
parent 5dbe6232
......@@ -236,17 +236,6 @@
}
]
},
{
"name": "spring.jooq.sql-dialect",
"providers": [
{
"name": "handle-as",
"parameters": {
"target": "org.jooq.SQLDialect"
}
}
]
},
{
"name": "spring.jmx.server",
"providers": [
......
......@@ -48,6 +48,7 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
......@@ -57,6 +58,7 @@ import static org.junit.Assert.fail;
*
* @author Andreas Ahlenstorf
* @author Phillip Webb
* @author Andy Wilkinson
*/
public class JooqAutoConfigurationTests {
......@@ -155,6 +157,15 @@ public class JooqAutoConfigurationTests {
assertThat(dsl.configuration().visitListenerProviders().length, equalTo(1));
}
@Test
public void relaxedBindingOfSqlDialect() {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.jooq.sql-dialect:PoSTGrES");
registerAndRefresh(JooqDataSourceConfiguration.class, JooqAutoConfiguration.class);
assertThat(this.context.getBean(org.jooq.Configuration.class).dialect(),
is(equalTo(SQLDialect.POSTGRES)));
}
private void registerAndRefresh(Class<?>... annotatedClasses) {
this.context.register(annotatedClasses);
this.context.refresh();
......
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