Skip to content

Commit 09f56a6

Browse files
committed
use JOOQ BOM and CRT
1 parent dba99e7 commit 09f56a6

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

pom.xml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@
2828
</exclusion>
2929
</exclusions>
3030
</dependency>
31+
32+
<dependency>
33+
<groupId>org.apache.logging.log4j</groupId>
34+
<artifactId>log4j-bom</artifactId>
35+
<version>2.24.3</version>
36+
<type>pom</type>
37+
<scope>import</scope>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.jooq</groupId>
42+
<artifactId>jooq-bom</artifactId>
43+
<version>3.20.5</version>
44+
<type>pom</type>
45+
<scope>import</scope>
46+
</dependency>
47+
3148
</dependencies>
3249
</dependencyManagement>
3350

@@ -54,20 +71,19 @@
5471
<artifactId>aws-lambda-java-log4j2</artifactId>
5572
<version>1.6.0</version>
5673
</dependency>
74+
75+
5776
<dependency>
5877
<groupId>org.apache.logging.log4j</groupId>
5978
<artifactId>log4j-api</artifactId>
60-
<version>2.24.3</version>
6179
</dependency>
6280
<dependency>
6381
<groupId>org.apache.logging.log4j</groupId>
6482
<artifactId>log4j-core</artifactId>
65-
<version>2.24.3</version>
6683
</dependency>
6784
<dependency>
6885
<groupId>org.apache.logging.log4j</groupId>
69-
<artifactId>log4j-slf4j18-impl</artifactId>
70-
<version>2.18.0</version>
86+
<artifactId>log4j-slf4j-impl</artifactId>
7187
</dependency>
7288

7389

@@ -81,6 +97,11 @@
8197
</exclusion>
8298
</exclusions>
8399
</dependency>
100+
101+
<dependency>
102+
<groupId>software.amazon.awssdk</groupId>
103+
<artifactId>aws-crt-client</artifactId>
104+
</dependency>
84105

85106
<dependency>
86107
<groupId>org.postgresql</groupId>
@@ -90,7 +111,6 @@
90111
<dependency>
91112
<groupId>org.jooq</groupId>
92113
<artifactId>jooq</artifactId>
93-
<version>3.20.5</version>
94114
</dependency>
95115
<dependency>
96116
<groupId>software.amazon.lambda</groupId>

src/main/java/demo/PostgresAddressTrigger.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
import java.util.Objects;
1010
import org.jooq.JSONB;
1111
import org.jooq.impl.DSL;
12-
import software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider;
13-
import software.amazon.awssdk.core.SdkSystemSetting;
14-
import software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient;
15-
import software.amazon.awssdk.regions.Region;
12+
import software.amazon.awssdk.http.crt.AwsCrtHttpClient;
1613
import software.amazon.awssdk.services.location.LocationClient;
1714
import software.amazon.awssdk.services.location.model.SearchPlaceIndexForTextResponse;
1815

@@ -28,9 +25,7 @@ public class PostgresAddressTrigger extends PostgresAbstractTrigger {
2825

2926
static {
3027
locationClient = LocationClient.builder()
31-
.region(Region.of(System.getenv(SdkSystemSetting.AWS_REGION.environmentVariable())))
32-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
33-
.httpClient(UrlConnectionHttpClient.builder().build())
28+
.httpClient(AwsCrtHttpClient.builder().build())
3429
.build();
3530

3631
PLACE_INDEX = System.getenv("PLACE_INDEX");

0 commit comments

Comments
 (0)