Skip to content

Commit 13bae2e

Browse files
authored
Merge branch 'main' into 50288-follow-up
2 parents ed8d3df + ffebdaa commit 13bae2e

File tree

47 files changed

+348
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+348
-465
lines changed

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<extension>
1313
<groupId>com.gradle</groupId>
1414
<artifactId>quarkus-build-caching-extension</artifactId>
15-
<version>1.11</version>
15+
<version>1.12</version>
1616
</extension>
1717
<extension>
1818
<groupId>io.quarkus.develocity</groupId>

bom/application/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<smallrye-context-propagation.version>2.3.0</smallrye-context-propagation.version>
5858
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
5959
<smallrye-reactive-types-converter.version>3.0.3</smallrye-reactive-types-converter.version>
60-
<smallrye-mutiny-vertx-binding.version>3.20.4</smallrye-mutiny-vertx-binding.version>
60+
<smallrye-mutiny-vertx-binding.version>3.21.1</smallrye-mutiny-vertx-binding.version>
6161
<smallrye-reactive-messaging.version>4.31.0</smallrye-reactive-messaging.version>
6262
<smallrye-stork.version>2.7.3</smallrye-stork.version>
6363
<jakarta.activation.version>2.1.4</jakarta.activation.version>
@@ -137,7 +137,7 @@
137137
<brotli4j.version>1.16.0</brotli4j.version>
138138
<reactive-streams.version>1.0.4</reactive-streams.version>
139139
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
140-
<mutiny.version>3.0.3</mutiny.version>
140+
<mutiny.version>3.1.0</mutiny.version>
141141
<jctools-core.version>4.0.5</jctools-core.version>
142142
<kafka3.version>4.0.1</kafka3.version>
143143
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
@@ -180,7 +180,7 @@
180180
<quarkus-security.version>2.2.1</quarkus-security.version>
181181
<keycloak-client.version>26.0.7</keycloak-client.version>
182182
<logstash-gelf.version>1.15.1</logstash-gelf.version>
183-
<checker-qual.version>3.52.0</checker-qual.version>
183+
<checker-qual.version>3.52.1</checker-qual.version>
184184
<error-prone-annotations.version>2.45.0</error-prone-annotations.version>
185185
<jib-core.version>0.28.1</jib-core.version>
186186
<google-http-client.version>1.47.1</google-http-client.version>
@@ -196,11 +196,11 @@
196196
<avro.version>1.12.0</avro.version>
197197
<apicurio-registry.version>2.6.13.Final</apicurio-registry.version>
198198
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
199-
<testcontainers.version>1.21.3</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
200-
<docker-java.version>3.4.2</docker-java.version> <!-- must be the version Testcontainers use: https://central.sonatype.com/artifact/org.testcontainers/testcontainers -->
199+
<testcontainers.version>2.0.2</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
200+
<docker-java.version>3.7.0</docker-java.version> <!-- must be the version Testcontainers use: https://central.sonatype.com/artifact/org.testcontainers/testcontainers -->
201201
<!-- Check the compatibility matrix (https://github.com/opensearch-project/opensearch-testcontainers) before upgrading: -->
202-
<opensearch-testcontainers.version>2.0.2</opensearch-testcontainers.version>
203-
<com.dajudge.kindcontainer>1.4.10</com.dajudge.kindcontainer>
202+
<opensearch-testcontainers.version>2.1.3</opensearch-testcontainers.version>
203+
<com.dajudge.kindcontainer>2.0.0</com.dajudge.kindcontainer>
204204
<aesh.version>2.8.2</aesh.version>
205205
<aesh-readline.version>2.6</aesh-readline.version>
206206
<jansi.version>2.4.0</jansi.version> <!-- Keep in sync with aesh-readline and dekorate -->

core/deployment/src/main/java/io/quarkus/deployment/DebugConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public interface DebugConfig {
2121

2222
/**
2323
* If set to true, writes a list of all reflective classes to META-INF
24+
* <p>
25+
* For fast-jar the META-INF is inside of quarkus-app/quarkus/generated-bytecode.jar
2426
*/
2527
@WithDefault("false")
2628
boolean reflection();

docs/src/main/asciidoc/rest-client.adoc

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,9 @@ public class TestClientRequestFilter implements ResteasyReactiveClientRequestFil
13411341
}
13421342
----
13431343

1344-
== Customizing the ObjectMapper in REST Client Jackson
1344+
== Jackson-specific features
1345+
1346+
=== Customizing the ObjectMapper in REST Client Jackson
13451347

13461348
The REST Client supports adding a custom ObjectMapper to be used only the Client using the annotation `@ClientObjectMapper`.
13471349

@@ -1369,6 +1371,60 @@ public interface ExtensionsService {
13691371
<2> It's must be a static method. Also, the parameter `defaultObjectMapper` will be resolved via CDI. If not found, it will throw an exception at runtime.
13701372
<3> In this example, we're creating a copy of the default object mapper. You should *NEVER* modify the default object mapper, but create a copy instead.
13711373

1374+
=== @JsonView support
1375+
1376+
Jakarta REST methods can be annotated with https://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonView.html[@JsonView]
1377+
in order to customize the serialization of the returned POJO, on a per method-basis. This is best explained with an example.
1378+
1379+
A typical use of `@JsonView` is to hide certain fields on certain methods. In that vein, let's define two views:
1380+
1381+
[source,java]
1382+
----
1383+
public class Views {
1384+
1385+
public static class Public {
1386+
}
1387+
1388+
public static class Private extends Public {
1389+
}
1390+
}
1391+
----
1392+
1393+
Let's assume we have the `User` POJO on which we want to hide some field during serialization. A simple example of this is:
1394+
1395+
[source,java]
1396+
----
1397+
public class User {
1398+
1399+
@JsonView(Views.Private.class)
1400+
public int id;
1401+
1402+
@JsonView(Views.Public.class)
1403+
public String name;
1404+
}
1405+
----
1406+
1407+
The REST Client supports `@JsonView` both for sending content to the REST API and for retrieving data from it:
1408+
1409+
[source,java]
1410+
----
1411+
@Path("/users")
1412+
@RegisterRestClient
1413+
public interface UserClient {
1414+
@GET
1415+
@Path("/{id}")
1416+
@Produces(MediaType.APPLICATION_JSON)
1417+
@JsonView(Views.Public.class)
1418+
User get(@RestPath String id);
1419+
1420+
@POST
1421+
@Consumes(MediaType.APPLICATION_JSON)
1422+
Response create(@JsonView(Views.Public.class) User user);
1423+
}
1424+
----
1425+
1426+
In the preceding code, the `get` method would return a `User` whose `id` is always `null` while the `create` method would never include `id` in the JSON it sends to the REST API.
1427+
13721428
== Exception handling
13731429

13741430
The MicroProfile REST Client specification introduces the `org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper` whose purpose is to convert an HTTP response to an exception.

docs/src/main/asciidoc/security-csrf-prevention.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ include::{generated-dir}/config/quarkus-rest-csrf.adoc[leveloffset=+1, opts=opti
329329
[[csrf-prevention-programmatic-set-up]]
330330
== Configuring the CSRF prevention programmatically
331331

332-
When the `quarkus-rest-csrf` extension is used, the `io.quarkus.vertx.http.security.HttpSecurity` CDI event allows you to customize the CSRF prevention programmatically:
332+
When the `quarkus-rest-csrf` extension is used together with the `quarkus-security` extension, the `io.quarkus.vertx.http.security.HttpSecurity` CDI event allows you to customize the CSRF prevention programmatically:
333333

334334
[source,java]
335335
----

extensions/devservices/db2/pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
</dependency>
1919
<dependency>
2020
<groupId>org.testcontainers</groupId>
21-
<artifactId>db2</artifactId>
22-
<exclusions>
23-
<exclusion>
24-
<groupId>junit</groupId>
25-
<artifactId>junit</artifactId>
26-
</exclusion>
27-
</exclusions>
21+
<artifactId>testcontainers-db2</artifactId>
2822
</dependency>
2923
<dependency>
3024
<groupId>io.quarkus</groupId>

extensions/devservices/db2/src/main/java/io/quarkus/devservices/db2/deployment/DB2DevServicesProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static io.quarkus.datasource.deployment.spi.DatabaseDefaultSetupConfig.DEFAULT_DATABASE_NAME;
44
import static io.quarkus.datasource.deployment.spi.DatabaseDefaultSetupConfig.DEFAULT_DATABASE_PASSWORD;
55
import static io.quarkus.datasource.deployment.spi.DatabaseDefaultSetupConfig.DEFAULT_DATABASE_USERNAME;
6-
import static org.testcontainers.containers.Db2Container.DB2_PORT;
6+
import static org.testcontainers.db2.Db2Container.DB2_PORT;
77

88
import java.time.Duration;
99
import java.util.List;
@@ -12,7 +12,7 @@
1212
import java.util.function.Supplier;
1313

1414
import org.jboss.logging.Logger;
15-
import org.testcontainers.containers.Db2Container;
15+
import org.testcontainers.db2.Db2Container;
1616
import org.testcontainers.utility.DockerImageName;
1717

1818
import io.quarkus.datasource.common.runtime.DataSourceUtil;

extensions/devservices/mariadb/pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
</dependency>
1919
<dependency>
2020
<groupId>org.testcontainers</groupId>
21-
<artifactId>mariadb</artifactId>
22-
<exclusions>
23-
<exclusion>
24-
<groupId>junit</groupId>
25-
<artifactId>junit</artifactId>
26-
</exclusion>
27-
</exclusions>
21+
<artifactId>testcontainers-mariadb</artifactId>
2822
</dependency>
2923
<dependency>
3024
<groupId>io.quarkus</groupId>

extensions/devservices/mariadb/src/main/java/io/quarkus/devservices/mariadb/deployment/MariaDBDevServicesProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import java.util.function.Supplier;
1212

1313
import org.jboss.logging.Logger;
14-
import org.testcontainers.containers.MariaDBContainer;
14+
import org.testcontainers.mariadb.MariaDBContainer;
1515
import org.testcontainers.utility.DockerImageName;
1616

1717
import io.quarkus.datasource.common.runtime.DataSourceUtil;

extensions/devservices/mssql/pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
</dependency>
1919
<dependency>
2020
<groupId>org.testcontainers</groupId>
21-
<artifactId>mssqlserver</artifactId>
22-
<exclusions>
23-
<exclusion>
24-
<groupId>junit</groupId>
25-
<artifactId>junit</artifactId>
26-
</exclusion>
27-
</exclusions>
21+
<artifactId>testcontainers-mssqlserver</artifactId>
2822
</dependency>
2923
<dependency>
3024
<groupId>io.quarkus</groupId>

0 commit comments

Comments
 (0)