Skip to content

Commit

Permalink
Trim credential provider config and driver class name in datasource c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
gsmet committed Jan 11, 2022
1 parent d260ed0 commit 017e0b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConvertWith;
import io.quarkus.runtime.configuration.TrimmedStringConverter;

@ConfigGroup
public class DataSourceJdbcBuildTimeConfig {
Expand All @@ -18,6 +20,7 @@ public class DataSourceJdbcBuildTimeConfig {
* The datasource driver class name
*/
@ConfigItem
@ConvertWith(TrimmedStringConverter.class)
public Optional<String> driver = Optional.empty();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConvertWith;
import io.quarkus.runtime.configuration.TrimmedStringConverter;

@ConfigGroup
public class DataSourceRuntimeConfig {
Expand All @@ -24,6 +26,7 @@ public class DataSourceRuntimeConfig {
* The credentials provider name
*/
@ConfigItem
@ConvertWith(TrimmedStringConverter.class)
public Optional<String> credentialsProvider = Optional.empty();

/**
Expand All @@ -35,5 +38,6 @@ public class DataSourceRuntimeConfig {
* For Vault it is: vault-credentials-provider. Not necessary if there is only one credentials provider available.
*/
@ConfigItem
@ConvertWith(TrimmedStringConverter.class)
public Optional<String> credentialsProviderName = Optional.empty();
}

0 comments on commit 017e0b4

Please sign in to comment.