Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5609e9f
update method links to be surrounded with `(` and `)` with params sep…
lewisbirks Jun 20, 2025
65aaedf
fixing links in the routing doc
lewisbirks Jun 20, 2025
b6f25be
fixing links in the context doc
lewisbirks Jun 20, 2025
ff46411
fixing links in the mvc-api doc
lewisbirks Jun 20, 2025
4192e47
fixing links in the static-files doc
lewisbirks Jun 20, 2025
cfcb641
fixing links in the session doc
lewisbirks Jun 20, 2025
da2b976
fixing links in the websocket doc
lewisbirks Jun 20, 2025
e3abac2
allow defining a jooby library other than 'core'
lewisbirks Jun 20, 2025
bef4b01
fixing links in the execution-model doc
lewisbirks Jun 20, 2025
e186256
change library to artifact to better align with maven
lewisbirks Jun 21, 2025
25f178e
fix processing of arrays
lewisbirks Jun 21, 2025
f9954db
fixing links in the responses doc
lewisbirks Jun 21, 2025
cef56e4
fixing links in the error-handling doc
lewisbirks Jun 21, 2025
d6b193c
fixing links in the configuration doc
lewisbirks Jun 21, 2025
f360cb5
fixing links in the testing doc
lewisbirks Jun 21, 2025
d797ef4
fixing list in the development doc
lewisbirks Jun 21, 2025
e69b549
fixing links in the handler/access-log doc
lewisbirks Jun 21, 2025
ff866ba
fixing links in the handler/cors doc
lewisbirks Jun 22, 2025
9ce82b3
fixing links in the handler/csrf doc
lewisbirks Jun 22, 2025
dff25be
fixing links in the handler/head doc
lewisbirks Jun 22, 2025
35c6647
fixing links in the handler/ssl doc
lewisbirks Jun 22, 2025
4e1b9ed
fixing links in the handler/trace doc
lewisbirks Jun 22, 2025
061a9f0
fixing links in the servers doc
lewisbirks Jun 22, 2025
4dd6375
fixing links in the ebean doc
lewisbirks Jun 22, 2025
bf7394e
add question for graphql
lewisbirks Jun 22, 2025
2e2372d
fixing links in the hikari doc
lewisbirks Jun 22, 2025
bc80678
fixing links in the hibernate doc
lewisbirks Jun 22, 2025
1069f51
fixing links in the jdbi doc
lewisbirks Jun 22, 2025
26eb2d4
fixing links in the redis doc
lewisbirks Jun 22, 2025
b4c9d4a
fixing links in the modules doc
lewisbirks Jun 23, 2025
de3c1c6
fix formtting in the camel doc
lewisbirks Jun 23, 2025
3b56679
fixing links in the jackson doc
lewisbirks Jun 23, 2025
49f6157
fixing links in the thymeleaf doc
lewisbirks Jun 23, 2025
e374abc
fixing links in the pac4j doc
lewisbirks Jun 23, 2025
8761a90
fixing links in the jwt-session-store doc
lewisbirks Jun 23, 2025
993d0e5
fixing links in the db-scheduler doc
lewisbirks Jun 23, 2025
d86518a
fixing links in the quartz doc
lewisbirks Jun 23, 2025
decf357
rename library to module
lewisbirks Jun 23, 2025
9effb07
remove references to starters
lewisbirks Jun 23, 2025
2540237
update trust proxy link
lewisbirks Jun 23, 2025
a54ace5
add all overloads for send
lewisbirks Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/asciidoc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ To skip/ignore Jooby loading and precedence mechanism, just instantiate and set
----

<1> Loads and parses configuration
<2> Create a new environment with configuration and (http://optionally[optionally]) active names
<2> Create a new environment with configuration and (optionally) active names
<3> Set environment on Jooby instance

IMPORTANT: Custom configuration is very flexible. You can reuse Jooby mechanism or provide your own.
Expand Down
8 changes: 4 additions & 4 deletions docs/asciidoc/context.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ There are several parameter types: `header`, `cookie`, `path`, `query`, `form`,
`session` and `flash`. All them share a unified/type-safe API for accessing and manipulating their values.

We are going to describe them briefly in the next sections, then go into specific features of the
<<Value API>>.
<<context-value-api,Value API>>.

There is also a <<context-parameters-parameter-lookup,parameter lookup>> feature by which you can access a parameter from any combination
of the above types with well-defined priority.
Expand Down Expand Up @@ -540,7 +540,7 @@ File upload are available ONLY for multipart requests.

==== Session

Session parameters are available via javadoc::Context[session] or javadoc::Context[sessionOrNull]
Session parameters are available via javadoc:Context[session] or javadoc:Context[sessionOrNull]
methods. HTTP Session is covered in his own <<session, chapter>>, but here is a quick look:

.Java
Expand Down Expand Up @@ -599,7 +599,7 @@ a javadoc:Session[] but the lifecycle is shorter: *data is kept for only one req
<3> Display an existing flash attribute `success` or shows `Welcome!`

Flash attributes are implemented using an `HTTP Cookie`. To customize the cookie
(its name defaults to `jooby.flash`) use the javadoc:Router[setFlashCookie, Cookie] method:
(its name defaults to `jooby.flash`) use the javadoc:Router[setFlashCookie, io.jooby.Cookie] method:

.Java
[source,java,role="primary"]
Expand All @@ -626,7 +626,7 @@ Flash attributes are implemented using an `HTTP Cookie`. To customize the cookie
==== Parameter Lookup

You can search for parameters in multiple sources with an explicitly defined priority using the
javadoc:Context[lookup] or javadoc:Context[lookup, java.lang.String, ParamSource...] method:
javadoc:Context[lookup] or javadoc:Context[lookup, java.lang.String, io.jooby.ParamSource...] method:

.Java
[source,java,role="primary"]
Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/dev-tools.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ joobyRun {
<3> Source extensions. A change on these files trigger a compilation request, followed by a restart request.
<4> Application port
<5> How long to wait after last file change to restart. Default is: `500` milliseconds.
<5> Use a single/fat class loader to run your application. This is required on complex project classpath where you start seeing weird reflection errors. This was the default mode in Jooby 2.x. The new model since 3.x uses a modular classloader which improves restart times and memory usage making it faster. Default is: `false`.
<6> Use a single/fat class loader to run your application. This is required on complex project classpath where you start seeing weird reflection errors. This was the default mode in Jooby 2.x. The new model since 3.x uses a modular classloader which improves restart times and memory usage making it faster. Default is: `false`.

For Maven and Gradle there are two variant `mvn jooby:testRun` and `./gradlew joobyTestRun` they work
by expanding the classpath to uses the `test` scope or source set.
4 changes: 2 additions & 2 deletions docs/asciidoc/error-handler.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
== Error Handler

Jooby catches application exception using the javadoc:ErrorHandler[] class. The
javadoc:ErrorHandler[DEFAULT] error handler produces simple HTML page or JSON based on the value
javadoc:DefaultErrorHandler[] error handler produces simple HTML page or JSON based on the value
of the `ACCEPT` header and log the exception.

.HTML:
Expand Down Expand Up @@ -32,7 +32,7 @@ io.jooby.StatusCodeException: Not found
at java.lang.Thread.run(Thread.java:748)
----

The javadoc:StatusCodeException[] works as generic exception that let you specify an status code.
The javadoc:exception.StatusCodeException[] works as generic exception that let you specify an status code.

----
throw new StatusCodeException(StatusCode.FORBIDDEN);
Expand Down
6 changes: 3 additions & 3 deletions docs/asciidoc/execution-model.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ worker executor is used when:

Each web server provides a default *worker executor*:

- Netty: The javadoc:netty.Netty[text=Netty server] implementation multiply the number of available processors
- Netty: The javadoc:netty.NettyServer[text=Netty server, artifact=jooby-netty] implementation multiply the number of available processors
(with a minimum of 2) by 8.

----
Expand All @@ -363,7 +363,7 @@ workerThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2) * 8

For example `8` cores gives us `64` worker threads.

- Undertow: The javadoc:utow.Utow[text=Undertow server] implementation multiply the number of available processors
- Undertow: The javadoc:undertow.UndertowServer[text=Undertow server, artifact=jooby-undertow] implementation multiply the number of available processors
by 8.

----
Expand All @@ -372,7 +372,7 @@ workerThreads = Runtime.getRuntime().availableProcessors() * 8

For `8` cores gives us `64` worker threads.

- Jetty: The javadoc:jetty.Jetty[text=Jetty server] implementation uses the default configuration
- Jetty: The javadoc:jetty.JettyServer[text=Jetty server, artifact=jooby-jetty] implementation uses the default configuration
with `200` worker threads.

These are sensible defaults suggested by the server implementation. If you need to increase/decrease
Expand Down
10 changes: 5 additions & 5 deletions docs/asciidoc/handlers/access-log.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== AccessLogHandler

The javadoc:AccessLogHandler[] logs incoming requests using the https://en.wikipedia.org/wiki/Common_Log_Format[NCSA format] (a.k.a common log format).
The javadoc:handler.AccessLogHandler[] logs incoming requests using the https://en.wikipedia.org/wiki/Common_Log_Format[NCSA format] (a.k.a common log format).

.Usage
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.AccessLogHandler;
import io.jooby.handler.AccessLogHandler;
...
{

Expand All @@ -21,7 +21,7 @@ import io.jooby.AccessLogHandler;
.Kotlin
[source, kotlin, role = "secondary"]
----
import io.jooby.AccessLogHandler
import io.jooby.handler.AccessLogHandler
...
{
use(AccessLogHandler()) <1>
Expand Down Expand Up @@ -50,8 +50,8 @@ Message is represented by:

Extra request or response headers can be appended at the end using the available methods:

- javadoc:AccessLogHandler[requestHeader, java.lang.String...]
- javadoc:AccessLogHandler[responseHeader, java.lang.String...]
- javadoc:handler.AccessLogHandler[requestHeader, java.lang.String...]
- javadoc:handler.AccessLogHandler[responseHeader, java.lang.String...]

[TIP]
====
Expand Down
18 changes: 10 additions & 8 deletions docs/asciidoc/handlers/cors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ request when it requests a resource that has a different origin (domain, protoco
its own origin.

Jooby supports CORS out of the box. By default, **CORS requests will be rejected**.
To enable processing of CORS requests, use the javadoc:CorsHandler[]:
To enable processing of CORS requests, use the javadoc:handler.CorsHandler[]:

.CorsExample
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.CorsHandler;
import io.jooby.handler.CorsHandler;
...
{

Expand All @@ -28,7 +28,7 @@ import io.jooby.CorsHandler;
.Kotlin
[source, kotlin, role = "secondary"]
----
import io.jooby.CorsHandler
import io.jooby.handler.CorsHandler
...
{
use(CorsHandler()) <1>
Expand All @@ -49,13 +49,14 @@ Default options are:
- allowed headers: `X-Requested-With`, `Content-Type`, `Accept` and `Origin`
- max age: `30m`;

To customize default options use javadoc:Cors[]:
To customize default options use javadoc:handler.Cors[]:

.Cors options
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.CorsHandler;
import io.jooby.handler.Cors;
import io.jooby.handler.CorsHandler;
...
{
Cors cors = new Cors()
Expand All @@ -73,7 +74,7 @@ import io.jooby.CorsHandler;
[source, kotlin, role = "secondary"]
----
import io.jooby.Jooby
import io.jooby.CorsHandler
import io.jooby.handler.CorsHandler
import io.jooby.cors
...
{
Expand Down Expand Up @@ -110,7 +111,8 @@ cors {
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.CorsHandler;
import io.jooby.handler.Cors;
import io.jooby.handler.CorsHandler;
...
{
Cors cors = Cors.from(getConfig()); <1>
Expand All @@ -127,7 +129,7 @@ import io.jooby.CorsHandler;
[source, kotlin, role = "secondary"]
----
import io.jooby.Jooby
import io.jooby.CorsHandler
import io.jooby.handler.CorsHandler
...
{
val cors = Cors.from(config) <1>
Expand Down
10 changes: 5 additions & 5 deletions docs/asciidoc/handlers/csrf.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== CsrfHandler

The javadoc:CsrfHandler[text="Cross Site Request Forgery Handler"] helps to protect from (CSRF)
The javadoc:handler.CsrfHandler[text="Cross Site Request Forgery Handler"] helps to protect from (CSRF)
attacks. Cross-site request forgeries are a type of malicious exploit whereby unauthorized commands
are performed on behalf of an authenticated user.

Expand All @@ -20,10 +20,10 @@ field in the form so that the CSRF protection middleware can validate the reques
</form>
----

The `csrf` is a request attribute created by the javadoc:CsrfHandler[] handler and rendered by a
The `csrf` is a request attribute created by the javadoc:handler.CsrfHandler[] handler and rendered by a
template engine. Here `{{csrf}}` we use Handlebars template engine (as example).

The javadoc:CsrfHandler[] handler, will automatically verify that the token in the request input
The javadoc:handler.CsrfHandler[] handler, will automatically verify that the token in the request input
matches the token stored in the session.

The token defaults name is `csrf` and can be provided as:
Expand All @@ -34,5 +34,5 @@ The token defaults name is `csrf` and can be provided as:

Configuration methods:

- javadoc:CsrfHandler["setTokenGenerator", java.util.Function]: Set a custom token generator. Defaults uses a random UUID.
- javadoc:CsrfHandler["setRequestFilter", java.util.Predicate]: Set a custom request filter. Defaults is to process `POST`, `PUT`, `PATCH` and `DELETE`.
- javadoc:handler.CsrfHandler["setTokenGenerator", java.util.function.Function]: Set a custom token generator. Defaults uses a random UUID.
- javadoc:handler.CsrfHandler["setRequestFilter", java.util.function.Predicate]: Set a custom request filter. Defaults is to process `POST`, `PUT`, `PATCH` and `DELETE`.
4 changes: 2 additions & 2 deletions docs/asciidoc/handlers/head.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Jooby doesn't support `HTTP HEAD` requests by default. To support them you have
- Use the built-in `HeadHandler`
- Write your own head handler

The javadoc:HeadHandler[] supports `HEAD` requests over existing `GET` handlers.
The javadoc:handler.HeadHandler[] supports `HEAD` requests over existing `GET` handlers.

.Head Example
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.HeadHandler;
import io.jooby.handler.HeadHandler;
...
{

Expand Down
14 changes: 7 additions & 7 deletions docs/asciidoc/handlers/ssl.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== SSLHandler

The javadoc:SSLHandler[] forces client to use HTTPS by redirecting non-HTTPS calls to the HTTPS version.
The javadoc:handler.SSLHandler[] forces client to use HTTPS by redirecting non-HTTPS calls to the HTTPS version.

.Force SSL
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.SSLHandler;
import io.jooby.handler.SSLHandler;
...
{

Expand All @@ -24,7 +24,7 @@ import io.jooby.SSLHandler;
[source, kotlin, role = "secondary"]
----
import io.jooby.Jooby
import io.jooby.SSHandler
import io.jooby.handler.SSHandler
...
{
serverOptions {
Expand All @@ -42,15 +42,15 @@ import io.jooby.SSHandler
<1> Install SSLHandler

The SSL Handler recreates the HTTPs URL version using the `Host` header, if you are behind a proxy
you will need to use the `X-Forwarded-Host` header. To do that set the <<router-trust-proxy, trust proxy>> option.
you will need to use the `X-Forwarded-Host` header. To do that set the <<router-options-trust-proxy, trust proxy>> option.

Optionally, you can specify the host to use:

.Force SSL
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.SSLHandler;
import io.jooby.handler.SSLHandler;
...
{

Expand All @@ -68,7 +68,7 @@ import io.jooby.SSLHandler;
[source, kotlin, role = "secondary"]
----
import io.jooby.Jooby
import io.jooby.SSHandler
import io.jooby.handler.SSHandler
...
{
serverOptions {
Expand All @@ -88,5 +88,5 @@ For more information about SSL, please check the <<server-https-support, configu
[TIP]
====
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to add the link:proxy-peer-address.adoc[] to your pipeline.
please consider to add the <<router-options-trust-proxy, trust proxy>> to your pipeline.
====
6 changes: 3 additions & 3 deletions docs/asciidoc/handlers/trace.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Jooby doesn't support `HTTP Trace` requests by default. To support them you have
- Use the built-in `TraceHandler`
- Write your own trace handler

The javadoc:TraceHandler[] supports `TRACE` requests over existing handlers.
The javadoc:handler.TraceHandler[] supports `TRACE` requests over existing handlers.

.Head Example
[source, java, role = "primary"]
----
import io.jooby.Jooby;
import io.jooby.TraceHandler;
import io.jooby.handler.TraceHandler;
...
{

Expand All @@ -27,7 +27,7 @@ import io.jooby.TraceHandler;
[source, kotlin, role = "secondary"]
----
import io.jooby.Jooby
import io.jooby.TraceHandler
import io.jooby.handler.TraceHandler
...
{
use(TraceHandler()) <1>
Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/modules/camel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MyRoutes: RouteBuilder() {

[IMPORTANT]
====
Keep in mind Camel beans are singleton by default, regardless of what dependency injection
Keep in mind Camel beans are singleton by default, regardless of what dependency injection
framework you choose.
====

Expand Down
8 changes: 4 additions & 4 deletions docs/asciidoc/modules/db-scheduler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import io.jooby.dbscheduler.DbSchedulerModule
=== Tasks

Tasks are created as described in https://github.com/kagkarlsson/db-scheduler[db-scheduler documentation]. Optionally,
you can annotate a method with the javadoc:dbscheduler.Scheduled[] annotation:
you can annotate a method with the javadoc:dbscheduler.Scheduled[artifact="jooby-db-scheduler", module="jooby.dbscheduler"] annotation:

.Sample Job
[source, java, role="primary"]
Expand Down Expand Up @@ -91,7 +91,7 @@ A task method must follow these rules:

=== Scheduled

The javadoc:dbscheduler.Scheduled[] annotation supports simple and cron triggers as well as property references:
The javadoc:dbscheduler.Scheduled[artifact="jooby-db-scheduler", module="jooby.dbscheduler"] annotation supports simple and cron triggers as well as property references:

.Same as .fixedDelay(Duration) with duration.
----
Expand Down Expand Up @@ -127,8 +127,8 @@ The `mytask.trigger` must be defined in your application property file. It could

=== Configuration

Configuration from properties files is fully supported, just need to add javadoc:dbscheduler.DbSchedulerProperties[] properties to your
application configuration file:
Configuration from properties files is fully supported, just need to add javadoc:dbscheduler.DbSchedulerProperties[artifact="jooby-db-scheduler", module="jooby.dbscheduler"]
properties to your application configuration file:

.Options
[source, properties]
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/modules/ebean.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ import io.jooby.ebean.EbeanModule

=== Transactional Request

The javadoc:ebean.TransactionalRequest[] decorator takes care of a start/commit/rollback a
The javadoc:ebean.TransactionalRequest[artifact=jooby-ebean] decorator takes care of a start/commit/rollback a
transaction per HTTP request.

.TransactionalRequest
Expand Down Expand Up @@ -294,7 +294,7 @@ Advanced/Custom configuration is supported programmatically or using property fi
}
----

<1> Manually creates a database config or use the one provided by Jooby: javadoc:ebean.EbeanModule[create, io.jooby.Jooby, java.lang.String].
<1> Manually creates a database config or use the one provided by Jooby: javadoc:ebean.EbeanModule[create, io.jooby.Jooby, java.lang.String, artifact=jooby-ebean].
<2> Install Ebean with custom database config

.Configuration
Expand Down
4 changes: 0 additions & 4 deletions docs/asciidoc/modules/graphql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,3 @@ import io.jooby.graphql.GraphQLPlaygroundModule
<3> Install GraphQL Playground

https://github.com/prisma-labs/graphql-playground[GraphQL Playground] should be up and running at `/graphql`.

=== Starter

Checkout the starter/demo project for GraphQL: https://github.com/jooby-project/jooby/tree/2.x/starters/graphql-starter[GraphQL Starter].
Loading