mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 15:02:05 -03:30
Remove AUTO_SERVER H2 default JDBC property
This avoids problems if the hostname can't be resolved by InetAddress.getLocalHost() Closes #26042 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
parent
24aa6e143d
commit
3bcb8787c8
@ -123,7 +123,7 @@ public final class Database {
|
||||
if ("dev-file".equalsIgnoreCase(alias)) {
|
||||
return addH2NonKeywords("jdbc:h2:file:${kc.home.dir:${kc.db-url-path:" + escapeReplacements(System.getProperty("user.home")) + "}}" + escapeReplacements(File.separator) + "${kc.data.dir:data}"
|
||||
+ escapeReplacements(File.separator) + "h2" + escapeReplacements(File.separator)
|
||||
+ "keycloakdb${kc.db-url-properties:;;AUTO_SERVER=TRUE}");
|
||||
+ "keycloakdb${kc.db-url-properties:}");
|
||||
}
|
||||
return addH2NonKeywords("jdbc:h2:mem:keycloakdb${kc.db-url-properties:}");
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ public class ConfigurationTest {
|
||||
.toString()
|
||||
.replaceFirst(isWindows() ? "file:///" : "file://", "");
|
||||
|
||||
assertEquals("jdbc:h2:file:" + userHomeUri + "data/h2/keycloakdb;;AUTO_SERVER=TRUE;NON_KEYWORDS=VALUE", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
|
||||
assertEquals("jdbc:h2:file:" + userHomeUri + "data/h2/keycloakdb;NON_KEYWORDS=VALUE", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
|
||||
|
||||
ConfigArgsConfigSource.setCliArgs("--db=dev-mem");
|
||||
config = createConfig();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user