Skip to content

Commit

Permalink
Register properties file accessed by postgresSQL driver
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Jan 23, 2025
1 parent 3c3db93 commit 1954123
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.NativeImageFeatureBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
Expand All @@ -40,9 +41,12 @@ RuntimeReinitializedClassBuildItem runtimeReinitialize() {

@BuildStep
void registerDriver(BuildProducer<JdbcDriverBuildItem> jdbcDriver,
BuildProducer<NativeImageResourceBuildItem> resources,
SslNativeConfigBuildItem sslNativeConfigBuildItem) {
jdbcDriver.produce(new JdbcDriverBuildItem(DatabaseKind.POSTGRESQL, "org.postgresql.Driver",
"org.postgresql.xa.PGXADataSource"));
// Accessed in org.postgresql.Driver.loadDefaultProperties
resources.produce(new NativeImageResourceBuildItem("org/postgresql/driverconfig.properties"));
}

@BuildStep
Expand Down

0 comments on commit 1954123

Please sign in to comment.