diff --git a/docs/src/main/docbook/jersey.ent b/docs/src/main/docbook/jersey.ent index 956443ce8c..520c599e35 100644 --- a/docs/src/main/docbook/jersey.ent +++ b/docs/src/main/docbook/jersey.ent @@ -1,7 +1,7 @@ Configuration"> diff --git a/docs/src/main/docbook/mp-config.xml b/docs/src/main/docbook/mp-config.xml new file mode 100644 index 0000000000..36c1e454d7 --- /dev/null +++ b/docs/src/main/docbook/mp-config.xml @@ -0,0 +1,93 @@ + + + + %ents; ]> + + Jersey configuration + + This chapter provides Jersey configuration basics which includes configuration using default configuration + provider (included in Jersey by default) using system properties. And micro-profile configuration extension + which allows plugging-in of configuration modules based on micro profile configuration specification + +
+ Jersey default configuration provider + + Since Jersey 2.29 it is possible to turn on the ability to convert the System properties into + Configuration properties. That can be done by using the System property, too: + java -Djersey.config.allowSystemPropertiesProvider=true -DNAME=VALUE + + Note that with the security manager turned on, write access permission is required to execute + System.getProperties(). With insufficient permissions, the warning message is logged (with Level.FINER) and + only &jersey.common.CommonProperties;, &jersey.client.ClientProperties;, + and &jersey.server.ServerProperties; + properties are used, as the property names are known and System.getProperty(name) method can be used, + which does not require the write access permission. + +
+
+ Micro profile configuration provider + + Microprofile platform became very popular lately and µprofile.spec.link; + is a recommended way in the Jakarta EE world to configure the specifications under the Jakarta EE umbrella. + + + Jersey 2.29 comes with support for Microprofile Config implementation such as &helidon.link; or &smallrye.link;. + To configure the Jersey application, the microprofile-config.properties file needs to be created in the + META-INF folder. The required properties are then simply set in the microprofile-config.properties: + + NAME=VALUE + + + + Then Jersey Microprofile Config extension is needed to be added: + + <dependency> + <groupId>org.glassfish.jersey.ext.microprofile</groupId> + <artifactId>jersey-mp-config</artifactId> + <version>2.30</scope> + </dependency> + + And the Microprofile Config implementation, such as Helidon: + + <dependency> + <groupId>io.helidon.microprofile.config</groupId> + <artifactId>helidon-microprofile-config</artifactId> + <version>1.3.1</version> + </dependency> + + Or SmallRye: + + <dependency> + <groupId>io.smallrye</groupId> + <artifactId>smallrye-config</artifactId> + <version>1.3.6</version> + </dependency> + + or any other suitable Microprofile Config implementation. + +
+
\ No newline at end of file diff --git a/docs/src/main/docbook/user-guide.xml b/docs/src/main/docbook/user-guide.xml index fc1dbf264f..0247500361 100644 --- a/docs/src/main/docbook/user-guide.xml +++ b/docs/src/main/docbook/user-guide.xml @@ -1,7 +1,7 @@