Merge branch '3.1.x'
This commit is contained in:
@@ -129,7 +129,7 @@ public class JdbcEnvironmentRepository implements EnvironmentRepository, Ordered
|
||||
try {
|
||||
Map<String, Object> source;
|
||||
String name;
|
||||
if (enableSqlWithoutProfie && profile != null) {
|
||||
if (!enableSqlWithoutProfie || (enableSqlWithoutProfie && profile != null)) {
|
||||
source = this.jdbc.query(this.sql, this.extractor, application, profile, label);
|
||||
name = application + "-" + profile;
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ public class JdbcEnvironmentRepositoryTests {
|
||||
@Test
|
||||
public void testFailOnError() {
|
||||
JdbcEnvironmentProperties properties = new JdbcEnvironmentProperties();
|
||||
properties.setEnableSqlWithoutProfile(true);
|
||||
properties.setSqlWithoutProfile(
|
||||
"SELECT SHOULD_FAIL from TABLE_NOTEXIST where APPLICATION=? and PROFILE is null and LABEL=?");
|
||||
JdbcEnvironmentRepository repository = new JdbcEnvironmentRepository(new JdbcTemplate(this.dataSource),
|
||||
|
||||
Reference in New Issue
Block a user