Remove redundant metadata for JOOQ’s SQL dialect
Also add a test that I’d written before Phil fixed the problem in
5dbe623
.
See gh-3468
This commit is contained in:
parent
5dbe6232b8
commit
db50fb8704
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue