Skip to content

Commit 8b3ee28

Browse files
committed
doc: migration notes for 4.x
1 parent 2807a23 commit 8b3ee28

File tree

4 files changed

+83
-1
lines changed

4 files changed

+83
-1
lines changed

docs/asciidoc/body.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Raw `request body` is available via javadoc:Context[body] method:
4848
<2> `HTTP Body` as `byte array`
4949
<3> `HTTP Body` as `InputStream`
5050

51-
This give us the `raw body`.
51+
This gives us the `raw body`.
5252

5353
==== Message Decoder
5454

docs/asciidoc/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Latest Release: https://github.com/jooby-project/jooby/releases/tag/v{joobyVersi
6262
6363
Looking for a previous version?
6464
65+
* Access to link:v3[3.x] documentation. See link:/migration/4.x[migrating from 3.x to 4.x]
6566
* Access to link:v2[2.x] documentation. See link:/migration/3.x[migrating from 2.x to 3.x]
6667
* Access to link:v1[1.x] documentation.
6768
====

docs/asciidoc/migration.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include::migration/4.x.adoc[]
12
include::migration/3.x.adoc[]
23

34
=== Upgrading from 1.x to 2.x

docs/asciidoc/migration/4.x.adoc

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
=== Upgrading from 3.x to 4.x
2+
You will find here notes/tips about how to migrate from 3.x to 4.x.
3+
4+
[NOTE]
5+
=====
6+
This is a **work in progress** document, if something is wrong or missing please https://github.com/jooby-project/jooby/issues/new[report to Github] or better https://github.com/jooby-project/jooby/edit/3.x/docs/asciidoc/migration/4.x.adoc[edit this file and fix it]
7+
=====
8+
9+
==== Requirements
10+
11+
- Java 21 as minimum
12+
13+
==== module-info.java
14+
15+
Jooby is now compatible with Java Module system.
16+
17+
Almost all Jooby components are now Java Modules, but not all them. For those where wasn't
18+
possible the Jooby module contains the `Automatic-Module-Name` manifest entry.
19+
20+
==== Buffer API
21+
22+
The package `io.jooby.buffer` is gone. It was replaced by `io.jooby.output` these classes
23+
are used mainly by the javadoc:MessageEncoder[] API, the new API is easier to use and has better
24+
performance.
25+
26+
==== Value API
27+
28+
The new package is now `io.jooby.value`. The API has now decoupled from javadoc:Context[]
29+
in future release will be the basis of a new configuration system.
30+
31+
Also, the `io.jooby.ValueNode` and `io.jooby.ValueNodeConverter` are gone.
32+
33+
==== Session API
34+
35+
For security reasons, the default HTTP session was removed. You need to configure the session
36+
explicitly and provide a cookie session name. The `jooby.sid` cookie name was removed from project.
37+
38+
==== Server configuration
39+
40+
The `install(Server)`, `setServerOptions`, `start()` method are gone. With the new support for
41+
multiple applications in a single server, these methods are useless.
42+
43+
The new way:
44+
45+
.New way to boot
46+
----
47+
runApp(args, new NettyServer(new ServerOptions()), App::new);
48+
----
49+
50+
51+
==== Packages
52+
|===
53+
|3.x|4.x|Module
54+
|io.jooby.buffer| io.jooby.output | replacement jooby (core)
55+
|===
56+
57+
==== Classes
58+
|===
59+
|3.x|4.x|Description|Module
60+
|io.jooby.buffer.*|-| removed | jooby (core)
61+
||io.jooby.output.*| new output API | jooby (core)
62+
|io.jooby.MvcFactory|-| was deprecated and now removed | jooby (core)
63+
|io.jooby.annotation.ResultType|-| removed | jooby (core)
64+
|io.jooby.ValueNode|io.jooby.value.Value| replaced/merged | jooby (core)
65+
|io.jooby.ValueNodeConverter|io.jooby.value.ValueConverter| replaced/merged | jooby (core)
66+
|io.jooby.RouteSet|io.jooby.Route.Set| moved into Route and renamed to Set | jooby (core)
67+
|===
68+
69+
==== Method
70+
|===
71+
|2.x|3.x|Description
72+
|io.jooby.Jooby.setServerOptions()|Server.setOptions()| removed in favor of `Server.setOptions()`
73+
|io.jooby.Router.mvc|-| it was deprecated and now removed
74+
|io.jooby.Router.decorator|-| it was deprecated and now removed
75+
|io.jooby.Router.getConverters|io.jooby.Router.getValueFactory| replaced
76+
|io.jooby.Router.getBeanConverters|io.jooby.Router.getValueFactory| replaced
77+
|io.jooby.Router.attribute(String)|Router.getAttribute(String)| Renamed
78+
|io.jooby.Router.RouteOption|io.jooby.RouterOptions| Moved to `RouterOptions`
79+
|io.jooby.Router.setTrustProxy|RouterOptions.setTrustProxy| Moved to `RouterOptions`
80+
|===

0 commit comments

Comments
 (0)