Skip to content

Commit 95beecc

Browse files
committed
Sync web site with Quarkus documentation
1 parent cfafe82 commit 95beecc

Some content is hidden

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

41 files changed

+140
-91
lines changed

_data/versioned/latest/index/quarkus.yaml

+16-6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ types:
3737
- title: Contexts and Dependency Injection
3838
filename: cdi-reference.adoc
3939
summary: Go more in depth into the Quarkus implementation of CDI.
40+
keywords: arc
4041
categories: core
4142
type: reference
4243
url: /guides/cdi-reference
@@ -55,7 +56,7 @@ types:
5556
- title: Logging configuration
5657
filename: logging.adoc
5758
summary: "Read about the use of logging API in Quarkus, configuring logging output, and using logging adapters to unify the output from other logging APIs."
58-
categories: "core, getting-started, observability"
59+
categories: "getting-started, core, observability"
5960
id: logging
6061
type: reference
6162
url: /guides/logging
@@ -173,6 +174,7 @@ types:
173174
- title: Configuring Well-Known OpenID Connect Providers
174175
filename: security-openid-connect-providers.adoc
175176
summary: This document explains how to configure well-known social OIDC and OAuth2 providers.
177+
keywords: oidc github twitter google facebook mastodon microsoft apple spotify twitch
176178
categories: "security, web"
177179
id: security-openid-connect-providers
178180
type: concepts
@@ -236,7 +238,7 @@ types:
236238
- title: Security vulnerability detection and reporting in Quarkus
237239
filename: security-vulnerability-detection.adoc
238240
summary: Most of the Quarkus tags are registered in the US National Vulnerability Database (NVD) in Common Platform Enumeration (CPE) name format.
239-
categories: "contributing, security"
241+
categories: "security, contributing"
240242
id: security-vulnerability-detection
241243
type: concepts
242244
url: /guides/security-vulnerability-detection
@@ -265,15 +267,15 @@ types:
265267
- title: Use virtual threads in REST applications
266268
filename: resteasy-reactive-virtual-threads.adoc
267269
summary: How to use virtual threads in a REST application
268-
categories: "core, web"
270+
categories: "web, core"
269271
id: resteasy-reactive-virtual-threads
270272
type: howto
271273
url: /guides/resteasy-reactive-virtual-threads
272274
tutorial:
273275
- title: Building a Native Executable
274276
filename: building-native-image.adoc
275277
summary: Build native executables with GraalVM or Mandrel.
276-
categories: "native, getting-started"
278+
categories: "getting-started, native"
277279
type: tutorial
278280
url: /guides/building-native-image
279281
- title: Collect metrics using Micrometer
@@ -338,7 +340,7 @@ types:
338340
- title: Your second Quarkus application
339341
filename: getting-started-dev-services.adoc
340342
summary: Discover some of the features that make developing with Quarkus a joyful experience.
341-
categories: "core, getting-started, data"
343+
categories: "getting-started, data, core"
342344
id: getting-started-dev-services-tutorial
343345
type: tutorial
344346
url: /guides/getting-started-dev-services
@@ -406,6 +408,7 @@ types:
406408
- title: Application Initialization and Termination
407409
filename: lifecycle.adoc
408410
summary: You often need to execute custom actions when the application starts and clean up everything when the application stops.
411+
keywords: lifecycle event
409412
categories: core
410413
type: guide
411414
url: /guides/lifecycle
@@ -565,6 +568,7 @@ types:
565568
- title: Dev Services and UI for OpenID Connect (OIDC)
566569
filename: security-openid-connect-dev-services.adoc
567570
summary: Start Keycloak or other providers automatically in dev and test modes.
571+
keywords: sso oidc security keycloak
568572
categories: security
569573
type: guide
570574
url: /guides/security-openid-connect-dev-services
@@ -789,6 +793,7 @@ types:
789793
- title: Introduction to Contexts and Dependency Injection (CDI)
790794
filename: cdi.adoc
791795
summary: "Quarkus DI solution is based on the [Jakarta Contexts and Dependency Injection 4.0](https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html) specification."
796+
keywords: qualifier event interceptor observer arc
792797
categories: core
793798
type: guide
794799
url: /guides/cdi
@@ -1087,7 +1092,7 @@ types:
10871092
- title: Testing Your Application
10881093
filename: getting-started-testing.adoc
10891094
summary: "This guide covers testing in JVM mode, native mode, and injection of resources into tests"
1090-
categories: "native, tooling, core"
1095+
categories: "tooling, native, core"
10911096
id: testing
10921097
type: guide
10931098
url: /guides/getting-started-testing
@@ -1154,6 +1159,8 @@ types:
11541159
- title: Using Keycloak Admin Client
11551160
filename: security-keycloak-admin-client.adoc
11561161
summary: The Quarkus Keycloak Admin Client and its reactive twin support Keycloak Admin Client which can be used to configure a running Keycloak server.
1162+
keywords: sso oidc security keycloak
1163+
categories: security
11571164
type: guide
11581165
url: /guides/security-keycloak-admin-client
11591166
- title: Using Kotlin
@@ -1176,6 +1183,7 @@ types:
11761183
- title: Using OAuth2 RBAC
11771184
filename: security-oauth2.adoc
11781185
summary: This guide explains how your Quarkus application can utilize OAuth2 tokens to provide secured access to the Jakarta REST endpoints.
1186+
keywords: oauth
11791187
categories: security
11801188
type: guide
11811189
url: /guides/security-oauth2
@@ -1188,12 +1196,14 @@ types:
11881196
- title: Using OpenID Connect (OIDC) Multi-Tenancy
11891197
filename: security-openid-connect-multitenancy.adoc
11901198
summary: This guide demonstrates how your OpenID Connect application can support multi-tenancy so that you can serve multiple tenants from a single application.
1199+
keywords: sso oidc oauth2 security
11911200
categories: security
11921201
type: guide
11931202
url: /guides/security-openid-connect-multitenancy
11941203
- title: Using OpenID Connect (OIDC) and Keycloak to Centralize Authorization
11951204
filename: security-keycloak-authorization.adoc
11961205
summary: This guide demonstrates how your Quarkus application can authorize access to protected resources using Keycloak Authorization Services.
1206+
keywords: sso oidc security keycloak
11971207
categories: security
11981208
type: guide
11991209
url: /guides/security-keycloak-authorization

_guides/_attributes.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Common attributes.
22
// --> No blank lines (it ends the document header)
33
:project-name: Quarkus
4-
:quarkus-version: 3.4.2
4+
:quarkus-version: 3.4.3
55
:quarkus-platform-groupid: io.quarkus.platform
66
// .
77
:maven-version: 3.9.3

_guides/ansible.adoc

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
////
2+
This guide is maintained in the main Quarkus repository
3+
and pull requests should be submitted there:
4+
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
5+
////
16
= Automate Quarkus deployment with Ansible
27
include::_attributes.adoc[]
38
:categories: command-line

_guides/cdi-reference.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
66
= Contexts and Dependency Injection
77
include::_attributes.adoc[]
88
:categories: core
9+
:keywords: arc
910
:summary: Go more in depth into the Quarkus implementation of CDI.
1011
:numbered:
1112
:sectnums:

_guides/cdi.adoc

+36-35
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
66
= Introduction to Contexts and Dependency Injection (CDI)
77
include::_attributes.adoc[]
88
:categories: core
9+
:keywords: qualifier event interceptor observer arc
910
:summary: Quarkus DI solution is based on the [Jakarta Contexts and Dependency Injection 4.0](https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html) specification. This guide explains the basics of CDI.
1011
:numbered:
1112
:sectnums:
@@ -28,7 +29,7 @@ It creates and destroys the instances of beans, associates the instances with a
2829

2930
An application developer can focus on the business logic rather than finding out "where and how" to obtain a fully initialized component with all of its dependencies.
3031

31-
NOTE: You've probably heard of the _inversion of control_ (IoC) programming principle. Dependency injection is one of the implementation techniques of IoC.
32+
NOTE: You've probably heard of the _inversion of control_ (IoC) programming principle. Dependency injection is one of the implementation techniques of IoC.
3233

3334
== What does a bean look like?
3435

@@ -47,9 +48,9 @@ public class Translator {
4748
4849
@Inject
4950
Dictionary dictionary; <2>
50-
51+
5152
@Counted <3>
52-
String translate(String sentence) {
53+
String translate(String sentence) {
5354
// ...
5455
}
5556
}
@@ -86,8 +87,8 @@ public class Translator {
8687
8788
@Inject
8889
Instance<Dictionary> dictionaries; <1>
89-
90-
String translate(String sentence) {
90+
91+
String translate(String sentence) {
9192
for (Dictionary dict : dictionaries) { <2>
9293
// ...
9394
}
@@ -122,11 +123,11 @@ public class Translator {
122123
}
123124
}
124125
----
125-
<1> This is a constructor injection.
126-
In fact, this code would not work in regular CDI implementations where a bean with a normal scope must always declare a no-args constructor and the bean constructor must be annotated with `@Inject`.
126+
<1> This is a constructor injection.
127+
In fact, this code would not work in regular CDI implementations where a bean with a normal scope must always declare a no-args constructor and the bean constructor must be annotated with `@Inject`.
127128
However, in Quarkus we detect the absence of no-args constructor and "add" it directly in the bytecode.
128129
It's also not necessary to add `@Inject` if there is only one constructor present.
129-
<2> An initializer method must be annotated with `@Inject`.
130+
<2> An initializer method must be annotated with `@Inject`.
130131
<3> An initializer may accept multiple parameters - each one is an injection point.
131132

132133
== You talked about some qualifiers?
@@ -155,7 +156,7 @@ The qualifiers of a bean are declared by annotating the bean class or producer m
155156
@ApplicationScoped
156157
public class SuperiorTranslator extends Translator {
157158
158-
String translate(String sentence) {
159+
String translate(String sentence) {
159160
// ...
160161
}
161162
}
@@ -180,11 +181,11 @@ You can use all the built-in scopes mentioned by the specification except for `j
180181

181182
[options="header",cols="1,1"]
182183
|===
183-
|Annotation |Description
184+
|Annotation |Description
184185
//----------------------
185-
|`@jakarta.enterprise.context.ApplicationScoped` | A single bean instance is used for the application and shared among all injection points. The instance is created lazily, i.e. once a method is invoked upon the xref:client_proxies[client proxy].
186+
|`@jakarta.enterprise.context.ApplicationScoped` | A single bean instance is used for the application and shared among all injection points. The instance is created lazily, i.e. once a method is invoked upon the xref:client_proxies[client proxy].
186187
|`@jakarta.inject.Singleton` | Just like `@ApplicationScoped` except that no client proxy is used. The instance is created when an injection point that resolves to a @Singleton bean is being injected.
187-
|`@jakarta.enterprise.context.RequestScoped` | The bean instance is associated with the current _request_ (usually an HTTP request).
188+
|`@jakarta.enterprise.context.RequestScoped` | The bean instance is associated with the current _request_ (usually an HTTP request).
188189
|`@jakarta.enterprise.context.Dependent` | This is a pseudo-scope. The instances are not shared and every injection point spawns a new instance of the dependent bean. The lifecycle of dependent bean is bound to the bean injecting it - it will be created and destroyed along with the bean injecting it.
189190
|`@jakarta.enterprise.context.SessionScoped` | This scope is backed by a `jakarta.servlet.http.HttpSession` object. It's only available if the `quarkus-undertow` extension is used.
190191
|===
@@ -217,23 +218,23 @@ Indeed, the https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#
217218
A client proxy is basically an object that delegates all method invocations to a target bean instance.
218219
It's a container construct that implements `io.quarkus.arc.ClientProxy` and extends the bean class.
219220
220-
IMPORTANT: Client proxies only delegate method invocations. So never read or write a field of a normal scoped bean, otherwise you will work with non-contextual or stale data.
221+
IMPORTANT: Client proxies only delegate method invocations. So never read or write a field of a normal scoped bean, otherwise you will work with non-contextual or stale data.
221222
222223
.Generated Client Proxy Example
223224
[source,java]
224225
----
225226
@ApplicationScoped
226227
class Translator {
227228

228-
String translate(String sentence) {
229+
String translate(String sentence) {
229230
// ...
230231
}
231232
}
232233

233234
// The client proxy class is generated and looks like...
234235
class Translator_ClientProxy extends Translator { <1>
235236

236-
String translate(String sentence) {
237+
String translate(String sentence) {
237238
// Find the correct translator instance...
238239
Translator translator = getTranslatorInstanceFromTheApplicationContext();
239240
// And delegate the method invocation...
@@ -247,10 +248,10 @@ Client proxies allow for:
247248
248249
* Lazy instantiation - the instance is created once a method is invoked upon the proxy.
249250
* Ability to inject a bean with "narrower" scope to a bean with "wider" scope; i.e. you can inject a `@RequestScoped` bean into an `@ApplicationScoped` bean.
250-
* Circular dependencies in the dependency graph. Having circular dependencies is often an indication that a redesign should be considered, but sometimes it's inevitable.
251+
* Circular dependencies in the dependency graph. Having circular dependencies is often an indication that a redesign should be considered, but sometimes it's inevitable.
251252
* In rare cases it's practical to destroy the beans manually. A direct injected reference would lead to a stale bean instance.
252-
253-
253+
254+
254255
== OK. You said that there are several kinds of beans?
255256
256257
Yes. In general, we distinguish:
@@ -273,7 +274,7 @@ public class Producers {
273274

274275
@Produces <1>
275276
double pi = Math.PI; <2>
276-
277+
277278
@Produces <3>
278279
List<String> names() {
279280
List<String> names = new ArrayList<>();
@@ -289,26 +290,26 @@ public class Consumer {
289290

290291
@Inject
291292
double pi;
292-
293+
293294
@Inject
294295
List<String> names;
295-
296-
// ...
297-
}
296+
297+
// ...
298+
}
298299
----
299300
<1> The container analyses the field annotations to build a bean metadata.
300-
The _type_ is used to build the set of bean types.
301+
The _type_ is used to build the set of bean types.
301302
In this case, it will be `double` and `java.lang.Object`.
302303
No scope annotation is declared and so it's defaulted to `@Dependent`.
303304
<2> The container will read this field when creating the bean instance.
304305
<3> The container analyses the method annotations to build a bean metadata.
305-
The _return type_ is used to build the set of bean types.
306+
The _return type_ is used to build the set of bean types.
306307
In this case, it will be `List<String>`, `Collection<String>`, `Iterable<String>` and `java.lang.Object`.
307308
No scope annotation is declared and so it's defaulted to `@Dependent`.
308309
<4> The container will call this method when creating the bean instance.
309310
310-
There's more about producers.
311-
You can declare qualifiers, inject dependencies into the producer methods parameters, etc.
311+
There's more about producers.
312+
You can declare qualifiers, inject dependencies into the producer methods parameters, etc.
312313
You can read more about producers for example in the https://docs.jboss.org/weld/reference/latest/en-US/html/producermethods.html[Weld docs, window="_blank"].
313314
314315
== OK, injection looks cool. What other services are provided?
@@ -330,7 +331,7 @@ public class Translator {
330331
void init() {
331332
// ...
332333
}
333-
334+
334335
@PreDestroy <2>
335336
void destroy() {
336337
// ...
@@ -345,7 +346,7 @@ TIP: It's a good practice to keep the logic in the callbacks "without side effec
345346
[[interceptors]]
346347
=== Interceptors
347348
348-
Interceptors are used to separate cross-cutting concerns from business logic.
349+
Interceptors are used to separate cross-cutting concerns from business logic.
349350
There is a separate specification - Java Interceptors - that defines the basic programming model and semantics.
350351
351352
.Simple Interceptor Binding Example
@@ -392,11 +393,11 @@ public class LoggingInterceptor {
392393
// ...log after
393394
return ret;
394395
}
395-
396+
396397
}
397398
----
398399
<1> The interceptor binding annotation is used to bind our interceptor to a bean. Simply annotate a bean class with `@Logged`, as in the following example.
399-
<2> `Priority` enables the interceptor and affects the interceptor ordering. Interceptors with smaller priority values are called first.
400+
<2> `Priority` enables the interceptor and affects the interceptor ordering. Interceptors with smaller priority values are called first.
400401
<3> Marks an interceptor component.
401402
<4> An interceptor may inject dependencies.
402403
<5> `AroundInvoke` denotes a method that interposes on business methods.
@@ -448,7 +449,7 @@ public class LargeTxAccount implements Account { <3>
448449
@Any
449450
@Delegate
450451
Account delegate; <4>
451-
452+
452453
@Inject
453454
LogService logService; <5>
454455

@@ -458,10 +459,10 @@ public class LargeTxAccount implements Account { <3>
458459
logService.logWithdrawal(delegate, amount);
459460
}
460461
}
461-
462+
462463
}
463464
----
464-
<1> `@Priority` enables the decorator. Decorators with smaller priority values are called first.
465+
<1> `@Priority` enables the decorator. Decorators with smaller priority values are called first.
465466
<2> `@Decorator` marks a decorator component.
466467
<3> The set of decorated types includes all bean types which are Java interfaces, except for `java.io.Serializable`.
467468
<4> Each decorator must declare exactly one _delegate injection point_. The decorator applies to beans that are assignable to this delegate injection point.
@@ -471,7 +472,7 @@ public class LargeTxAccount implements Account { <3>
471472
NOTE: Instances of decorators are dependent objects of the bean instance they intercept, i.e. a new decorator instance is created for each intercepted bean.
472473
473474
=== Events and Observers
474-
475+
475476
Beans may also produce and consume events to interact in a completely decoupled fashion.
476477
Any Java object can serve as an event payload.
477478
The optional qualifiers act as topic selectors.

0 commit comments

Comments
 (0)