jooby set -w ~/Source
+jooby set -w ~/Source
diff --git a/index.html b/index.html index 2bcca2e..0d36ce3 100644 --- a/index.html +++ b/index.html @@ -570,7 +570,7 @@
import io.jooby.Jooby;
+import io.jooby.Jooby;
public class App extends Jooby {
@@ -944,15 +944,15 @@
+}
Looking for a previous version?
@@ -1029,7 +1029,7 @@import io.jooby.Jooby;
+import io.jooby.Jooby;
public class App extends Jooby {
@@ -1040,9 +1040,9 @@
+}
import io.jooby.annotation.*;
+import io.jooby.annotation.*;
public class MyController {
@@ -1125,9 +1125,9 @@
+}
Download jooby-cli.zip
+Download jooby-cli.zip
Unzip jooby-cli.zip
in your user home directory (or any other directory you prefer)
jooby set -w ~/Source
+jooby set -w ~/Source
jooby> create myapp
+jooby> create myapp
jooby> create myapp --kotlin
+jooby> create myapp --kotlin
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kotlin</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
jooby> create myapp --gradle
+jooby> create myapp --gradle
jooby> create myapp --gradle --kotlin
+jooby> create myapp --gradle --kotlin
jooby> create myapp --mvc
+jooby> create myapp --mvc
jooby> create myapp --server undertow
+jooby> create myapp --server undertow
jooby> create myapp --stork
+jooby> create myapp --stork
jooby> create myapp --docker
+jooby> create myapp --docker
jooby> create myapp -i
+jooby> create myapp -i
{
+{
get("/", ctx -> "Snippet");
-}
+}
{
+{
get("/foo", ctx -> "Foo")
.attribute("foo", "bar");
-}
+}
{
+{
use(next -> ctx -> {
User user = ...;
String role = ctx.getRoute().attribute("Role");
@@ -1522,9 +1522,9 @@
+}
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
+@Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface Role {
String value();
@@ -1564,9 +1564,9 @@
+}
{
+{
get("/foo", ctx -> "Foo");
-}
+}
{
+{
(1)
get("/user/{id}", ctx -> {
int id = ctx.path("id").intValue(); (2)
return id;
});
-}
+}
{
+{
(1)
get("/file/{file}.{ext}", ctx -> {
String filename = ctx.path("file").value(); (2)
String ext = ctx.path("ext").value(); (3)
return filename + "." + ext;
});
-}
+}
{
+{
(1)
get("/profile/{id}?", ctx -> {
String id = ctx.path("id").value("self"); (2)
return id;
});
-}
+}
{
+{
(1)
get("/user/{id:[0-9]+}", ctx -> {
int id = ctx.path("id").intValue(); (2)
return id;
});
-}
+}
{
+{
(1)
get("/articles/*", ctx -> {
String catchall = ctx.path("*").value(); (2)
@@ -1803,9 +1803,9 @@ (3)
return path;
});
-}
+}
{
+{
get("/user/{id}", ctx -> ctx.path("id").value()); (1)
get("/user/me", ctx -> "my profile"); (2)
@@ -1890,9 +1890,9 @@ (3)
get("/users", ctx -> "new users"); (4)
-}
+}
interface Filter {
+interface Filter {
Handler apply(Handler next);
-}
+}
{
+{
use(next -> ctx -> {
long start = System.currentTimeMillis(); (1)
@@ -1967,9 +1967,9 @@ <
get("/", ctx -> {
return "filter";
});
-}
+}
interface Before {
+interface Before {
void apply(Context ctx);
-}
+}
{
+{
before(ctx -> {
ctx.setResponseHeader("Server", "Jooby");
});
@@ -2053,9 +2053,9 @@ <
get("/", ctx -> {
return "...";
});
-}
+}
interface After {
+interface After {
void apply(Context ctx, Object result, Throwable failure);
-}
+}
{
+{
after((ctx, result, failure) -> {
System.out.println(result); (1)
ctx.setResponseHeader("foo", "bar"); (2)
@@ -2146,9 +2146,9 @@
+}
{
+{
after((ctx, result, failure) -> {
if (ctx.isResponseStarted()) {
// Don't modify response
@@ -2193,9 +2193,9 @@
+}
{
+{
after((ctx, result, failure) -> {
if (failure == null) {
db.commit(); (1)
@@ -2237,9 +2237,9 @@ (2)
}
});
-}
+}
{
+{
after((ctx, result, failure) -> {
if (failure instanceOf MyBusinessException) {
ctx.send("Recovering from something"); (1)
}
});
-}
+}
{
+{
after((ctx, result, failure) -> {
...
throw new AnotherException();
@@ -2307,9 +2307,9 @@ (1)
Throwable anotherException = failure.getSuppressed()[0]; (2)
});
-}
+}
{
+{
use(next -> ctx -> {
long start = System.currentTimeInMillis();
ctx.onComplete(context -> { (1)
@@ -2362,9 +2362,9 @@
+}
{
+{
// Increment +1
use(next -> ctx -> {
Number n = (Number) next.apply(ctx);
@@ -2417,9 +2417,9 @@ (1)
get("/2", ctx -> 2); (2)
-}
+}
{
+{
use("/*", (req, rsp, chain) -> {
// remote call, db call
});
// ...
-}
+}
{
+{
// Increment +1
use(next -> ctx -> {
Number n = (Number) next.apply(ctx);
@@ -2547,9 +2547,9 @@ <
});
get("/2", ctx -> 2); (2)
-}
+}
{
+{
// Increment +1
use(next -> ctx -> {
Number n = (Number) next.apply(ctx);
@@ -2615,9 +2615,9 @@ (3)
-}
+}
{
+{
routes(() -> {
get("/", ctx -> "Hello");
});
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", Context::getRequestPath);
}
@@ -2785,9 +2785,9 @@ (3)
}
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", Context::getRequestPath);
}
@@ -2838,9 +2838,9 @@ (1)
}
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", ctx -> ...);
}
@@ -2894,9 +2894,9 @@ (2)
}
-}
+}
{
+{
Foo foo = new Foo();
install(() -> foo); // Won't work
-}
+}
{
+{
install(() -> new Foo()); // Works!
-}
+}
public class V1 extends Jooby {
+public class V1 extends Jooby {
{
get("/api", ctx -> "v1");
}
@@ -2988,9 +2988,9 @@ (2)
}
-}
+}
<form method="post" action="/form">
+<form method="post" action="/form">
<input type="hidden" name="_method" value="put">
-</form>
+</form>
import io.jooby.Jooby;
+import io.jooby.Jooby;
...
{
@@ -3059,9 +3059,9 @@ (2)
});
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
...
{
setHiddenMethod(ctx -> ctx.header("X-HTTP-Method-Override").toOptional()); (1)
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
...
{
@@ -3137,9 +3137,9 @@ (5)
...
});
-}
+}
{
+{
get("/", ctx -> { /* do important stuff with variable 'ctx'. */ });
-}
+}
{
+{
setContextAsService(true);
-}
+}
application.lang = en, en-GB, de
+application.lang = en, en-GB, de
{
+{
setLocales(Locale.GERMAN, new Locale("hu", "HU"));
-}
+}
{
+{
get("/{id}" ctx -> ctx.path("id").value()); (1)
get("/@{id}" ctx -> ctx.path("id").value()); (2)
@@ -3414,9 +3414,9 @@ (4)
get("/{id:[0-9]+}", ctx -> ctx.path("id)) (5)
-}
+}
{
+{
get("/{name}", ctx -> {
String pathString = ctx.getRequestPath(); (1)
@@ -3469,9 +3469,9 @@
+}
FileUpload pic = ctx.file("pic"); (1)
+ FileUpload pic = ctx.file("pic"); (1)
List<FileUpload> pic = ctx.files("pic"); (2)
- List<FileUpload> files = ctx.files(); (3)
+ List<FileUpload> files = ctx.files(); (3)
Session session = ctx.session(); (1)
+ Session session = ctx.session(); (1)
- String attribute = ctx.session("attribute").value(); (2)
+ String attribute = ctx.session("attribute").value(); (2)
get("/", ctx -> {
+ get("/", ctx -> {
return ctx.flash("success").value("Welcome!"); (3)
});
post("/save", ctx -> {
ctx.flash("success", "Item created"); (1)
return ctx.sendRedirect("/"); (2)
- });
+ });
{
+{
setFlashCookie(new Cookie("myflash").setHttpOnly(true));
// or if you're fine with the default name
getFlashCookie().setHttpOnly(true);
-}
+}
get("/{foo}", ctx -> {
+get("/{foo}", ctx -> {
String foo = ctx.lookup("foo", ParamSource.QUERY, ParamSource.PATH).value();
return "foo is: " + foo;
});
@@ -4055,9 +4055,9 @@
+});
get("/{foo}", ctx -> {
+get("/{foo}", ctx -> {
List<Certificate> certificates = ctx.getClientCertificates(); (1)
Certificate peerCertificate = certificates.get(0); (2)
-});
+});
{
+{
get("/", ctx -> {
String name = ctx.query("name").value(); (1)
@@ -4154,9 +4154,9 @@ (4)
...
});
-}
+}
{
+{
get("/search", ctx -> {
String q = ctx.query("q").value("*:*"); (1)
return q;
@@ -4273,9 +4273,9 @@ (2)
return q;
});
-}
+}
{
+{
get("/", ctx -> {
Value user = ctx.query("user"); (1)
String name = user.get("name").value(); (2)
@@ -4443,9 +4443,9 @@ (4)
...
}}
-}
+}
class Member {
+class Member {
public final String firstname;
public final String lastName;
@@ -4547,11 +4547,11 @@ PO
this.id = id;
this.members = members;
}
-}
+}
{
+{
get("/", ctx -> {
Member member = ctx.query(Member.class);
...
});
-}
+}
{
+{
get("/", ctx -> {
Member member = ctx.query("member").to(Member.class);
...
});
-}
+}
{
+{
get("/", ctx -> {
List<Member> members = ctx.query().toList(Member.class);
...
});
-}
+}
{
+{
get("/", ctx -> {
Group group = ctx.query(Group.class);
...
});
-}
+}
class Member {
+class Member {
public final String firstname;
public final String lastname;
@@ -4701,9 +4701,9 @@ PO
public Member(@Named("first-name") String firstname, @Named("last-name") String lastname) {
....
}
-}
+}
{
+{
post("/string", ctx -> {
String body = ctx.body().value(); (1)
...
@@ -4736,9 +4736,9 @@ (3)
...
});
-}
+}
public interface MessageDecoder {
+public interface MessageDecoder {
<T> T decode(Context ctx, Type type) throws Exception;
-}
+}
{
+{
FavoriteJson lib = new FavoriteJson(); (1)
decoder(MediaType.json, (ctx, type) -> { (2)
@@ -4809,9 +4809,9 @@ (5)
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
{
+{
get("/", ctx -> {
ctx.setResponseCode(200); (1)
@@ -4899,9 +4899,9 @@ <
return "Response"; (4)
});
-}
+}
public interface MessageEncoder {
+public interface MessageEncoder {
byte[] encode(@NonNull Context ctx, @NonNull Object value) throws Exception;
-}
+}
{
+{
FavoriteJson lib = new FavoriteJson(); (1)
encoder(MediaType.json, (ctx, result) -> { (2)
@@ -4971,9 +4971,9 @@ (6)
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile) {
options.compilerArgs += [
'-parameters',
'-Ajooby.incremental=true',
'-Ajooby.services=true'
]
-}
+}
import io.jooby.annotation.*;
+import io.jooby.annotation.*;
@Path("/mvc") (1)
public class Controller {
@@ -5130,9 +5130,9 @@
+}
public class App extends Jooby {
+public class App extends Jooby {
{
mvc(new MyController_());
}
@@ -5199,15 +5199,15 @@
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@HeaderParam String token) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@HeaderParam("Last-Modified-Since") long lastModifiedSince) {
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@CookieParam String token) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@CookieParam("token-id") String tokenId) {
...
}
-}
+}
public class MyController {
+public class MyController {
@Path("/{id}")
public Object provisioning(@PathParam String id) {
...
}
-}
+}
public class MyController {
+public class MyController {
@Path("/")
public Object provisioning(@QueryParam String q) {
...
}
-}
+}
public class MyController {
+public class MyController {
@Path("/")
@POST
public Object provisioning(@FormParam String username) {
...
}
-}
+}
public class MyController {
+public class MyController {
@Path("/")
@POST
public Object provisioning(MyObject body) {
...
}
-}
+}
public class Controller {
+public class Controller {
@GET("/{foo}")
public String bind(@BindParam MyBean bean) {
return "with custom mapping: " + bean;
}
-}
+}
public record MyBean(String value) {
+public record MyBean(String value) {
public static MyBean of(Context ctx) {
// build MyBean from HTTP request
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@FlashParam String success) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@SessionParam String userId) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(Session session) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@ContextParam String userId) { (1)
...
}
-}
+}
public class MyController {
+public class MyController {
@GET
public Object provisioning(@ContextParam Map<String, Object> attributes) { (1)
...
}
-}
+}
public class FooController {
+public class FooController {
@GET("/{foo}")
public String multipleSources(@Param({ QUERY, PATH }) String foo) {
return "foo is: " + foo;
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
mvc(new MyController());
}
@@ -5811,15 +5811,15 @@ (1)
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
dispatch(() -> {
mvc(new MyBlockingController()); (1)
@@ -5847,9 +5847,9 @@
+}
public class MyController {
+public class MyController {
@GET("/nonblocking")
public String nonblocking() { (1)
return "I'm nonblocking";
@@ -5887,9 +5887,9 @@ (2)
return "I'm blocking";
}
-}
+}
public class MyController {
+public class MyController {
@GET("/blocking")
@Dispatch("single") (1)
public String blocking() {
return "I'm blocking";
}
-}
+}
{
+{
executor("single", Executors.newSingleThreadExecutor());
mvc(new MyController());
-}
+}
import javax.ws.rs.GET;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("/jaxrs")
@@ -5996,9 +5996,9 @@
+}
<plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
@@ -6104,9 +6104,9 @@
+ </plugin>
{
+{
assets("/static/*"); (1)
-}
+}
{
+{
assets("/static/*", Paths.get("www")); (1)
-}
+}
{
+{
assets("/myfile.js", "/static/myfile.js");
-}
+}
{
+{
Path docs = Paths.get("docs"); (1)
assets("/docs/?*", docs); (2)
-}
+}
{
+{
AssetSource docs = AssetSource.create(Paths.get("docs")); (1)
assets("/docs/?*", new AssetHandler("index.html", docs)); (2)
-}
+}
{
+{
AssetSource www = AssetSource.create(Paths.get("www"));
assets("/static/*", new AssetHandler(www)
.setLastModified(false)
.setEtag(false)
);
-}
+}
{
+{
AssetSource www = AssetSource.create(Paths.get("www"));
assets("/static/*", new AssetHandler(www)
.setMaxAge(Duration.ofDays(365))
);
-}
+}
{
+{
AssetSource www = AssetSource.create(Paths.get("www"));
assets("/static/*", new AssetHandler(www)
.cacheControl(path -> {
@@ -6377,9 +6377,9 @@
+}
{
+{
install(new MyTemplateEngineModule()); (1)
get("/", ctx -> {
MyModel model = ...; (2)
return new ModelAndView("index.html", model); (3)
});
-}
+}
{
+{
install(new MyTemplateEngineModule());
get("/", ctx -> {
@@ -6457,9 +6457,9 @@ (1)
});
-}
+}
{
+{
install(new HandlebarsModule()); (1)
install(new FreemarkerModule()); (2)
@@ -6529,9 +6529,9 @@ (4)
});
-}
+}
{
+{
get("/", ctx -> {
Session session = ctx.session(); (1)
@@ -6655,9 +6655,9 @@ (3)
});
-}
+}
{
+{
setSessionStore(SessionStore.memory(new Cookie("SESSION"))); (1)
get("/", ctx -> {
@@ -6701,9 +6701,9 @@
+}
{
+{
setSessionStore(SessionStore.memory(SessionToken.header("TOKEN"))); (1)
get("/", ctx -> {
@@ -6741,9 +6741,9 @@
+}
{
+{
setSessionStore(SessionStore.memory(SessionToken.comibe(SessionToken.cookie("SESSION"), SessionToken.header("TOKEN")))); (1)
get("/", ctx -> {
@@ -6781,9 +6781,9 @@
+}
{
+{
String secret = "super secret key"; (1)
setSessionStore(SessionStore.signed(secret)); (2)
@@ -6839,9 +6839,9 @@
+}
{
+{
String secret = "super secret key"; (1)
setSessionStore(SessionStore.signed(secret, SessionToken.header("TOKEN"))); (2)
@@ -6887,9 +6887,9 @@
+}
{
+{
ws("/ws", (ctx, configurer) -> { (1)
configurer.onConnect(ws -> {
ws.send("Connected"); (2)
@@ -6954,9 +6954,9 @@
+}
{
+{
ws("/ws/{key}", (ctx, configurer) -> {
String key = ctx.path("key").value(); (1)
String foo = ctx.session().get("foo").value(); (2)
...
});
-}
+}
import io.jooby.jackson.JacksonModule;
+import io.jooby.jackson.JacksonModule;
{
install(new JackonModule()); (1)
@@ -7059,9 +7059,9 @@ (3)
})
});
-}
+}
import io.jooby.jackson.JacksonModule;
+import io.jooby.jackson.JacksonModule;
{
install(new JackonModule()); (1)
@@ -7109,9 +7109,9 @@
+}
websocket.idleTimeout = 1h
+websocket.idleTimeout = 1h
websocket.maxSize = 128K
+websocket.maxSize = 128K
{
+{
sse("/sse", sse -> { (1)
sse.send("Welcome"); (2)
});
-}
+}
{
+{
sse("/sse", sse -> {
sse.onClose(() -> {
// clean up
});
});
-}
+}
{
+{
sse("/sse", sse -> {
sse.keepAlive(15, TimeUnit.SECONDS)
});
-}
+}
import static io.jooby.ExecutionMode.EVENT_LOOP;
+import static io.jooby.ExecutionMode.EVENT_LOOP;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7350,16 +7350,16 @@
+}
import static io.jooby.ExecutionMode.EVENT_LOOP;
+import static io.jooby.ExecutionMode.EVENT_LOOP;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7402,9 +7402,9 @@
+}
import static io.jooby.ExecutionMode.EVENT_LOOP;
+import static io.jooby.ExecutionMode.EVENT_LOOP;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7463,9 +7463,9 @@
+}
import static io.jooby.ExecutionMode.WORKER;
+import static io.jooby.ExecutionMode.WORKER;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7515,9 +7515,9 @@
+}
import static io.jooby.ExecutionMode.WORKER;
+import static io.jooby.ExecutionMode.WORKER;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7557,9 +7557,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7646,9 +7646,9 @@
+}
{
+{
configureServer(server -> {
server.workerThreads(Number);
});
-}
+}
{
+{
get("/json", ctx -> {
ctx.setContentType(MediaType.json);
return "{\"message\": \"Hello Raw Response\"}";
});
-}
+}
{
+{
get("/chunk", ctx -> {
try(Writer writer = ctx.responseWriter()) { (1)
writer.write("chunk1"); (2)
@@ -7868,9 +7868,9 @@ (3)
});
-}
+}
{
+{
get("/chunk", ctx -> {
return ctx.responseWriter(writer -> { (1)
writer.write("chunk1"); (2)
@@ -7914,9 +7914,9 @@
+}
{
+{
get("/download-file", ctx -> {
Path source = Paths.get("logo.png");
return new AttachedFile(source); (1)
@@ -7949,9 +7949,9 @@ (2)
});
-}
+}
FileDownload.Builder produceDownload(Context ctx) {
+FileDownload.Builder produceDownload(Context ctx) {
return FileDownload.build(...);
}
@@ -7992,9 +7992,9 @@
+}
{
+{
mode(EVENT_LOOP); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8037,9 +8037,9 @@ <
... (4)
});
})
-}
+}
{
+{
mode(WORKER); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8093,9 +8093,9 @@ <
... (4)
});
})
-}
+}
{
+{
mode(DEFAULT); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8149,9 +8149,9 @@ <
... (4)
});
})
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-mutiny</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.mutiny;
+import io.jooby.mutiny;
import io.smallrye.mutiny.Uni;
{
@@ -8274,9 +8274,9 @@ Uni
.completionStage(supplyAsync(() -> "Uni"))
.map(it -> "Hello " + it);
})
-}
+}
import io.jooby.mutiny;
+import io.jooby.mutiny;
import io.smallrye.mutiny.Multi;
{
@@ -8309,9 +8309,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-rxjava3</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.rxjava3.Reactivex;
+import io.jooby.rxjava3.Reactivex;
{
use(Reactivex.rx());
@@ -8389,9 +8389,9 @@
+}
import io.jooby.rxjava3.Reactivex;
+import io.jooby.rxjava3.Reactivex;
{
use(Reactivex.rx());
@@ -8420,9 +8420,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-reactor</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.Reactor;
+import io.jooby.Reactor;
{
use(Reactor.reactor());
@@ -8501,9 +8501,9 @@ Mo
.fromCallable(() -> "Mono")
.map(it -> "Hello " + it);
})
-}
+}
import io.jooby.Reactor;
+import io.jooby.Reactor;
{
use(Reactor.reactor())
@@ -8532,9 +8532,9 @@ Fl
return Flux.range(1, 10)
.map(it -> it + ", ");
})
-}
+}
{
+{
coroutine {
get("/") {
delay(100) (1)
"Hello Coroutines!" (2)
}
}
-}
+}
{
+{
coroutine {
get("/") {
ctx.doSomething() (1)
@@ -8617,7 +8617,7 @@ (2)
return "Hello Coroutines!" (3)
-}
+}
{
+{
worker(Executors.newCachedThreadPool())
coroutine {
@@ -8657,7 +8657,7 @@ (3)
}
}
-}
+}
{
+{
coroutine(CoroutineStart.UNDISPATCHED) {
get("/") {
val n = 5 * 5 (1)
@@ -8694,7 +8694,7 @@ (3)
}
}
-}
+}
{
+{
get("/", ctx -> {
return ctx.send("Hello World!");
});
-}
+}
{
+{
errorCode(MyException.class, StatusCode.XXX);
-}
+}
{
+{
error((ctx, cause, statusCode) -> { (1)
Router router = ctx.getRouter();
router.getLog().error("found `{}` error", statusCode.value(), cause); (2)
ctx.setResponseCode(statusCode);
ctx.send("found `" + statusCode.value() + "` error"); (3)
});
-}
+}
import static io.jooby.MediaType.json;
+import static io.jooby.MediaType.json;
import static io.jooby.MediaType.html;
{
@@ -8967,9 +8967,9 @@ (5)
}
});
-}
+}
import static io.jooby.StatusCode.NOT_FOUND;
+import static io.jooby.StatusCode.NOT_FOUND;
{
error(NOT_FOUND, (ctx, cause, statusCode) -> {
ctx.send(statusCode); (1)
});
-}
+}
{
+{
error(MyException.class, (ctx, cause, statusCode) -> {
// log and process MyException
});
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.AccessLogHandler;
...
{
@@ -9118,9 +9118,9 @@
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.CorsHandler;
...
{
@@ -9231,9 +9231,9 @@
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.CorsHandler;
...
{
@@ -9293,9 +9293,9 @@
+}
cors {
+cors {
origin: "*"
credentials: true
methods: [GET, POST],
headers: [Content-Type],
maxAge: 30m
exposedHeaders: [Custom-Header]
-}
+}
<form method="POST" action="...">
+<form method="POST" action="...">
<input name="csrf" value="{{csrf}}" type="hidden" />
...
-</form>
+</form>
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.GracefulShutdown;
...
{
@@ -9458,15 +9458,15 @@ (1)
// other routes go here
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.HeadHandler;
...
{
@@ -9526,9 +9526,9 @@
+}
<dependency>
+<dependency>
<groupId>com.github.vladimir-bukhtoyarov</groupId>
<artifactId>bucket4j-core</artifactId>
<version>8.0.1</version>
-</dependency>
+</dependency>
{
+{
Bandwidth limit = Bandwidth.simple(10, Duration.ofMinutes(1));
Bucket bucket = Bucket4j.builder().addLimit(limit).build(); (1)
before(new RateLimitHandler(bucket)); (2)
-}
+}
{
+{
before(new RateLimitHandler(remoteAddress -> {
Bandwidth limit = Bandwidth.simple(10, Duration.ofMinutes(1));
return Bucket4j.builder().addLimit(limit).build();
}));
-}
+}
{
+{
before(new RateLimitHandler(key -> {
Bandwidth limit = Bandwidth.simple(10, Duration.ofMinutes(1));
return Bucket4j.builder().addLimit(limit).build();
}, "ApiKey"));
-}
+}
{
+{
Bandwidth limit = Bandwidth.simple(10, Duration.ofMinutes(1));
Bucket bucket = Bucket4j.builder().addLimit(limit).build(); (1)
before(new RateLimitHandler(bucket)); (2)
-}
+}
{
+{
ProxyManager<String> buckets = ...;
before(RateLimitHandler.cluster(key -> {
return buckets.getProxy(key, () -> {
return ...;
});
}));
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.TraceHandler;
...
{
@@ -9842,9 +9842,9 @@ <
get("/", ctx -> {
...
});
-}
+}
{
+{
Environment env = getEnvironment();
-}
+}
└── conf
+└── conf
└── application.conf
-└── myapp.jar
+└── myapp.jar
Environment env = getEnvironment();
+ Environment env = getEnvironment();
└── myapp.jar
- └── application.conf (file inside jar)
+└── myapp.jar
+ └── application.conf (file inside jar)
foo = foo
+foo = foo
{
+{
Environment env = getEnvironment(); (1)
Config conf = env.getConfig(); (2)
System.out.println(conf.getString("foo")); (3)
-}
+}
java -jar myapp.jar foo=argument
+java -jar myapp.jar foo=argument
java -Dfoo=sysprop -jar myapp.jar
+java -Dfoo=sysprop -jar myapp.jar
foo=envar java -jar myapp.jar
+foo=envar java -jar myapp.jar
└── application.conf
-└── application.prod.conf
+└── application.conf
+└── application.prod.conf
foo = foo
-bar = devbar
+foo = foo
+bar = devbar
bar = prodbar
+bar = prodbar
{
+{
Environment env = setEnvironmentOptions(new EnvOptions() (1)
.setFilename("myapp.conf")
)
-}
+}
{
+{
Config conf = ConfigFatory.load("/path/to/myapp.conf"); (1)
Environment env = new Env(customConfig, "prod"); (2)
setEnvironment(env); (3)
-}
+}
<dependency>
+<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.6</version>
-</dependency>
+</dependency>
<dependency>
+<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.23.1</version>
@@ -10344,17 +10344,17 @@
+</dependency>
conf
+conf
└── logback.conf
-└── logback.prod.conf
+└── logback.prod.conf
public class App extends Jooby {
+public class App extends Jooby {
private static final Logger log = ...
public static void main(String[] args) {
runApp(args, App::new);
}
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-test</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
public class App extends Jooby {
+public class App extends Jooby {
{
get("/", ctx -> "Easy unit testing!");
}
-}
+}
import io.jooby.test.MockRouter;
+import io.jooby.test.MockRouter;
public class TestApp {
@@ -10579,9 +10579,9 @@
+}
public class App extends Jooby {
+public class App extends Jooby {
{
get("/", ctx -> ctx
.setResponseCode(StatusCode.OK)
.send("Easy unit testing")
);
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
post("/", ctx -> {
String name = ctx.form("name").value();
return name;
});
}
-}
+}
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class TestApp {
@@ -10732,9 +10732,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-test</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
public class App extends Jooby {
+public class App extends Jooby {
{
get("/", ctx -> "Easy testing!");
}
-}
+}
import io.jooby.JoobyTest;
+import io.jooby.JoobyTest;
@JoobyTest(App.class)
public class TestApp {
@@ -10849,9 +10849,9 @@
+}
Adding the annotation at class-level starts a single application before running tests and stop it
-after all them. The default port at class level is: 8911
.
Adding the annotation at method-level starts an application before running the test and stop it
-once it finish. The default port at method level is random
.
Default application port can be configured directly using the port() method:
+The default port is: 8911
. Application port can be configured directly using the port() method:
@JoobyTest(value = App.class, port = 9999)
@JoobyTest(App.class)
+@JoobyTest(App.class)
public void test(String serverPath) { (1)
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
public App(String argument) { (1)
get("/", ctx -> "Easy testing!");
}
-}
+}
import io.jooby.JoobyTest;
+import io.jooby.JoobyTest;
public class TestApp {
@@ -11016,9 +11008,9 @@ (2)
return new App("Argument"); (3)
}
-}
+}
<plugins>
+<plugins>
...
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</plugin>
...
-</plugins>
+</plugins>
<properties>
+<properties>
<application.class>myapp.App</application.class>
-</properties>
+</properties>
mvn jooby:run
+mvn jooby:run
<plugins>
+<plugins>
...
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
<configuration>
<mainClass>${application.class}</mainClass> (1)
<restartExtensions>conf,properties,class</restartExtensions> (2)
@@ -11184,17 +11176,17 @@ <
</configuration>
</plugin>
...
-</plugins>
+</plugins>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jetty</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-netty</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-undertow</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.netty.NettyServer;
+import io.jooby.netty.NettyServer;
{
install(new NettyServer());
-}
+}
{
+{
setServerOptions(new ServerOptions()
.setBufferSize(16384)
.setCompressionLevel(6)
@@ -11609,9 +11601,9 @@
+}
{
+{
setServerOptions(new ServerOptions()
.setSecurePort(8443) (1)
);
-}
+}
mkcert -pkcs12 localhost
+mkcert -pkcs12 localhost
mkcert localhost
+mkcert localhost
{
+{
SslOptions ssl = SslOptions.x509("path/to/server.crt", "path/to/server.key");
setServerOptions(new ServerOptions()
.setSsl(ssl) (1)
);
-}
+}
server {
+server {
ssl {
type: X509,
cert: "path/to/server.crt",
key: "path/to/server.key"
}
-}
+}
{
+{
setServerOptions(new ServerOptions()
.setSsl(SslOptions.from(getConfig()))
);
-}
+}
{
+{
SslOptions ssl = SslOptions.pkcs12("path/to/server.p12", "password");
setServerOptions(new ServerOptions()
.setSsl(ssl) (1)
);
-}
+}
server {
+server {
ssl {
type: PKCS12,
cert: "path/to/server.p12",
password: "password"
}
-}
+}
{
+{
setServerOptions(new ServerOptions()
.setSsl(SslOptions.from(getConfig()))
);
-}
+}
{
+{
SslOptions ssl = SslOptions.pkcs12("path/to/server.p12", "password")
.setTrustCert(Files.newInputStream("path/to/trustCert")) (1)
.setTrustPassword("password") (2)
@@ -11954,16 +11946,16 @@
+}
{
+{
setServerOptions(new ServerOptions()
.setSsl(SslOptions.from(getConfig()))
);
-}
+}
{
+{
setServerOptions(new ServerOptions()
.setSsl(new SslOptions().setProtocol("TLSv1.3", "TLSv1.2"))
);
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-conscrypt</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
{
+{
setServerOptions(new ServerOptions()
.setHttp2(true)
.setSecurePort(8433)
@@ -12127,9 +12119,9 @@
+}
import io.jooby.Extension;
+import io.jooby.Extension;
public class MyExtension implements Extension {
@@ -12205,9 +12197,9 @@ (4)
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
install(new MyExtension()); (1)
@@ -12257,9 +12249,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-inject</artifactId>
<version>1.1.0</version>
-</dependency>
+</dependency>
<build>
+<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -12345,15 +12337,15 @@
+</build>
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -12377,9 +12369,9 @@
+}
currency = USD
+currency = USD
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -12455,15 +12447,15 @@
+}
<dependency>
+<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger</artifactId>
<version>2.20</version>
-</dependency>
+</dependency>
<build>
+<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -12528,15 +12520,15 @@
+</build>
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12564,9 +12556,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12632,9 +12624,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12682,9 +12674,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-guice</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.kt.runApp;
public class App extends Jooby {
@@ -12752,9 +12744,9 @@
+}
currency = USD
+currency = USD
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.kt.runApp
public class App extends Jooby {
@@ -12837,9 +12829,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kotlin</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
{
+{
use("*", (req, rsp, chain) -> {
System.out.println("first");
// Moves execution to next handler: second
@@ -13649,7 +13641,7 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kotlin</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-inject</artifactId>
<version>1.1.0</version>
-</dependency>
+</dependency>
<build>
+<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -621,15 +621,15 @@
+</build>
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -653,9 +653,9 @@
+}
currency = USD
+currency = USD
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -731,15 +731,15 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-jsonb</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.avaje.jsonb.AvajeJsonbModule;
+import io.jooby.avaje.jsonb.AvajeJsonbModule;
{
install(new AvajeJsonbModule()); (1)
@@ -624,9 +624,9 @@ (3)
...
});
-}
+}
import io.jooby.avaje.jsonb.AvajeJsonbModule;
+import io.jooby.avaje.jsonb.AvajeJsonbModule;
import io.avaje.jsonb.Jsonb;
{
@@ -678,16 +678,16 @@
+}
import io.jooby.avaje.jsonb.AvajeJsonbModule;
+import io.jooby.avaje.jsonb.AvajeJsonbModule;
import io.avaje.jsonb.Jsonb;
{
var jsonb = Jsonb.builder().build();
install(new AvajeJsonbModule(jsonb));
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-awssdk-v1</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version></version>
-</dependency>
+</dependency>
aws.accessKeyId = "your access key id"
-aws.secretKey = "your secret key"
+aws.accessKeyId = "your access key id"
+aws.secretKey = "your secret key"
import io.jooby.awssdkv1.AwsModule;
+import io.jooby.awssdkv1.AwsModule;
{
install(
@@ -653,9 +653,9 @@ (4)
})
);
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-caffeine</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.caffeine.CaffeineSessionStore;
+import io.jooby.caffeine.CaffeineSessionStore;
{
setSessionStore(new CaffeineSessionStore()); (1)
@@ -618,9 +618,9 @@ (2)
// work with session
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-camel</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.camel.CamelModule;
+import io.jooby.camel.CamelModule;
{
install(new CamelModule(new MyRoutes())); (1)
@@ -632,9 +632,9 @@
+}
myprop = "my prop value"
+myprop = "my prop value"
public class MyRoutes extends RouteBuilder {
+public class MyRoutes extends RouteBuilder {
@Override public void configure() throws Exception {
from("direct://foo")
.log("{{myprop}}");
}
-}
+}
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.camel.CamelModule;
{
@@ -736,9 +736,9 @@ (3)
.log("${body}");
}
-}
+}
camel.main.name = My Camel Context
-camel.threadpool.poolSize = 10
+camel.main.name = My Camel Context
+camel.threadpool.poolSize = 10
<!-- DataSource via HikariCP-->
+<!-- DataSource via HikariCP-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- Ebean Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-ebean</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
-</dependency>
+</dependency>
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = myuser
-db.password = mypass
+db.password = mypass
<plugin>
+<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
@@ -665,9 +665,9 @@
+</plugin>
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.ebean.EbeanModule;
{
@@ -699,9 +699,9 @@ (3)
// work with Database
});
-}
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.ebean.EbeanModule;
import io.jooby.ebean.TransactionalRequest;
@@ -763,9 +763,9 @@
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Transactional(false)
@GET("/")
public void get(Context ctx) {
// no automatic transaction management here
-}
+}
import io.jooby.ebean.TransactionalRequest;
+import io.jooby.ebean.TransactionalRequest;
{
...
use(new TransactionalRequest().enabledByDefault(false));
...
-}
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Inject
private Database database;
@@ -856,9 +856,9 @@
+}
{
+{
get("/", ctx -> {
...
}).attribute(Transactional.ATTRIBUTE, false);
-}
+}
{
+{
DatabaseConfig dbConfig = ...; (1)
install(new EbeanModule(dbConfig)); (2)
-}
+}
{
+{
ebean {
ddl {
generate = true
run = true
}
}
-}
+}
<!-- DataSource via HikariCP-->
+<!-- DataSource via HikariCP-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- Flyway Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-flyway</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
-</dependency>
+</dependency>
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = myuser
-db.password = mypass
+db.password = mypass
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.flyway.FlywayModule;
{
@@ -657,16 +657,16 @@ (2)
-}
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.flyway.FlywayModule;
{
@@ -722,9 +722,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-freemarker</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<p> Hello ${name}! </p>
+<p> Hello ${name}! </p>
import io.jooby.freemarker.FreemarkerModule;
+import io.jooby.freemarker.FreemarkerModule;
{
install(new FreemarkerModule());
@@ -630,9 +630,9 @@
+}
freemarker.cacheStorage = soft
-freemarker.strictSyntax = yes
+freemarker.cacheStorage = soft
+freemarker.strictSyntax = yes
import io.jooby.freemarker.FreemarkerModule;
+import io.jooby.freemarker.FreemarkerModule;
{
Configuration freemarker = new Configuration();
install(new FreemarkerModule(freemarker));
-}
+}
<!-- GraphQL-->
+<!-- GraphQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphql</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- JSON library-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
import io.jooby.graphql.GraphQLModule;
{
@@ -672,9 +672,9 @@
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
import io.jooby.graphql.GraphQLModule;
{
install(new GraphQLModule(...)
.setSupportHttpGet(true)
);
-}
+}
<!-- JSON library-->
+<!-- JSON library-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- GraphQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphql</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- GraphIQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphiql</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
import io.jooby.graphql.GraphQLModule;
import io.jooby.graphql.GraphiQLModule;
@@ -861,9 +861,9 @@ (2)
install(new GraphiQLModule()); (3)
-}
+}
<!-- JSON library-->
+<!-- JSON library-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- GraphQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphql</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- GraphQL Playground-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphiql-playground</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
import io.jooby.graphql.GraphQLModule;
import io.jooby.graphql.GraphQLPlaygroundModule;
@@ -953,9 +953,9 @@ (2)
install(new GraphQLPlaygroundModule()); (3)
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-gson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.gson.GsonModule;
+import io.jooby.gson.GsonModule;
{
install(new GsonModule()); (1)
@@ -624,9 +624,9 @@ (3)
...
});
-}
+}
import io.jooby.gson.GsonModule;
+import io.jooby.gson.GsonModule;
{
install(new GsonModule());
@@ -677,15 +677,15 @@
+}
import io.jooby.gson.GsonModule;
+import io.jooby.gson.GsonModule;
{
Gson gson = new GsonBuilder().create();
install(new GsonModule(gson));
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-guice</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.kt.runApp;
public class App extends Jooby {
@@ -621,9 +621,9 @@
+}
currency = USD
+currency = USD
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.kt.runApp
public class App extends Jooby {
@@ -706,9 +706,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-handlebars</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<p> Hello {{name}}! </p>
+<p> Hello {{name}}! </p>
import io.jooby.handlebars.HandlebarsModule;
+import io.jooby.handlebars.HandlebarsModule;
{
install(new HandlebarsModule());
@@ -630,9 +630,9 @@
+}
import io.jooby.handlebars.HandlebarsModule;
+import io.jooby.handlebars.HandlebarsModule;
{
Handlebars handlebars = new Handlebars();
@@ -683,9 +683,9 @@
+}
<!-- DataSource via HikariCP-->
+<!-- DataSource via HikariCP-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- Hibernate Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hibernate</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
-</dependency>
+</dependency>
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = myuser
-db.password = mypass
+db.password = mypass
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.hibernate.HibernateModule;
{
install(new HikariModule()); (1)
@@ -682,9 +682,9 @@ (9)
}
});
-}
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.hibernate.HibernateModule;
import io.jooby.hibernate.TransactionalRequest;
@@ -816,9 +816,9 @@
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Transactional(false)
@GET("/")
public void get(Context ctx) {
// no automatic transaction management here
-}
+}
import io.jooby.ebean.TransactionalRequest;
+import io.jooby.ebean.TransactionalRequest;
{
...
use(new TransactionalRequest().enabledByDefault(false));
...
-}
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Inject
private EntityManager entityManager;
@@ -933,9 +933,9 @@
+}
{
+{
get("/", ctx -> {
...
}).attribute(Transactional.ATTRIBUTE, false);
-}
+}
{
+{
get("/pets", ctx -> require(UnitOfWork.class)
.apply(em -> em.createQuery("from Pet", Pet.class).getResultList()));
-}
+}
{
+{
get("/update", ctx -> require(UnitOfWork.class)
.apply((em, txh) -> {
em.createQuery("from Pet", Pet.class).getResultList().forEach(pet -> {
@@ -1023,9 +1023,9 @@
+}
{
+{
use(new TransactionalRequest());
// will lead to exception
get("/nope", ctx -> require(UnitOfWork.class)
.apply(em -> em.createQuery("from Pet", Pet.class).getResultList()));
-}
+}
hibernate.hbm2ddl.auto = create
+hibernate.hbm2ddl.auto = create
{
+{
install(new HibernateModule().with(builder -> {
return builder
.flushMode(AUTO)
.openSession();
}));
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
-</dependency>
+</dependency>
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = myuser
-db.password = mypass
+db.password = mypass
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
{
install(new HikariModule());
@@ -649,9 +649,9 @@
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
{
install(new HikariModule("mydb"));
-}
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
{
install(new HikariModule("jdbc:mysql://localhost/mydb"));
-}
+}
maindb.url = "jdbc:mysql://localhost/main"
+maindb.url = "jdbc:mysql://localhost/main"
maindb.user = myuser
maindb.password = mypass
auditdb.url = "jdbc:mysql://localhost/audit"
auditdb.user = myuser
-auditdb.password = mypass
+auditdb.password = mypass
db.url = "jdbc:mysql://localhost/main"
+db.url = "jdbc:mysql://localhost/main"
db.user = myuser
-hikari.maximumPoolSize = 10
+hikari.maximumPoolSize = 10
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
install(new JacksonModule()); (1)
@@ -625,9 +625,9 @@ (3)
...
});
-}
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
install(new JacksonModule());
@@ -678,15 +678,15 @@
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
ObjectMapper mapper = new ObjectMapper();
install(new JacksonModule(mapper));
-}
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
install(new JacksonModule(new XmlMapper()));
-}
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
install(new JacksonModule(new ObjectMapper()));
install(new JacksonModule(new XmlMapper()));
-}
+}
import io.jooby.json.JacksonModule;
+import io.jooby.json.JacksonModule;
{
install(new JacksonModule().module(MyModule.class);
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jasypt</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
jasypt.password = password (1)
+jasypt.password = password (1)
-enc.property = "uTSqb9grs1+vUv3iN8lItC0kl65lMG+8" (2)
+enc.property = "uTSqb9grs1+vUv3iN8lItC0kl65lMG+8" (2)
import io.jooby.jasypt.JasyptModule;
+import io.jooby.jasypt.JasyptModule;
{
install(new JasyptModule()); (3)
@@ -634,9 +634,9 @@ (4)
System.out.println(property);
-}
+}
import io.jooby.jasypt.JasyptModule;
+import io.jooby.jasypt.JasyptModule;
{
install(new JasyptModule());
PBEStringEncryptor encryptor = require(PBEStringEncryptor.class);
-}
+}
jasypt.password = mypassword
-jasypt.password = ${?JASYPT_PASSWORD}
+jasypt.password = mypassword
+jasypt.password = ${?JASYPT_PASSWORD}
{
+{
install(new JasyptModule(config -> {
return new String(Files.path(Paths.get("mypassword"), UTF-8));
}));
-}
+}
jasypt.password = mypassword
+jasypt.password = mypassword
jasypt.algorithm = PBEWithMD5AndDES
jasypt.keyObtentionIterations = 1000
jasypt.poolSize = 2
jasypt.ivGeneratorClassName = classname
jasypt.saltGeneratorClassName = org.jasypt.salt.RandomSaltGenerator
-jasypt.providerName = SunJCE
+jasypt.providerName = SunJCE
<!-- DataSource via HikariCP-->
+<!-- DataSource via HikariCP-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
</dependency>
<!-- Jdbi Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jdbi</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
-</dependency>
+</dependency>
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = myuser
-db.password = mypass
+db.password = mypass
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.jdbi.JdbiModule;
{
@@ -671,9 +671,9 @@
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.jdbi.JdbiModule;
import io.jooby.jdbi.TransactionalRequest;
@@ -749,9 +749,9 @@
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Transactional(false)
@GET("/")
public void get(Context ctx) {
// no automatic transaction management here
-}
+}
import io.jooby.ebean.TransactionalRequest;
+import io.jooby.ebean.TransactionalRequest;
{
...
use(new TransactionalRequest().enabledByDefault(false));
...
-}
+}
import io.jooby.annotation.Transactional;
+import io.jooby.annotation.Transactional;
@Inject
private Handle handle;
@@ -847,9 +847,9 @@
+}
{
+{
get("/", ctx -> {
...
}).attribute(Transactional.ATTRIBUTE, false);
-}
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.jdbi.JdbiModule;
import io.jooby.jdbi.TransactionalRequest;
@@ -911,9 +911,9 @@
+}
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.jdbi.JdbiModule;
import io.jooby.jdbi.TransactionalRequest;
@@ -954,9 +954,9 @@ <
Jdbi jdbi = Jdbi.create(dataSource);
return jdbi;
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jstachio</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
@JStache(path="index.mustache") (1)
-public record IndexPage(String message){}
+@JStache(path="index.mustache") (1)
+public record IndexPage(String message){}
<p>Hello {{message}}!</p>
+<p>Hello {{message}}!</p>
import io.jooby.jstachio.JStachioModule;
+import io.jooby.jstachio.JStachioModule;
{
install(new JStachioModule()); (1)
@@ -686,9 +686,9 @@ (2)
});
-}
+}
import io.jooby.jstachio.JStachioModule;
+import io.jooby.jstachio.JStachioModule;
{
install(new JStachioModule().bufferSize(1024));
-}
+}
<dependencies>
+<dependencies>
<dependency>
<groupId>io.jstach</groupId>
<artifactId>jstachio-jmustache</artifactId>
<version>1.3.5</version>
<scope>runtime</scope>
</dependency>
-<dependencies>
+<dependencies>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jte</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<plugin>
+<plugin>
<groupId>gg.jte</groupId>
<artifactId>jte-maven-plugin</artifactId>
<version>${jte.version}</version>
@@ -631,9 +631,9 @@
+</plugin>
@param String name
+@param String name
-<p>Hello ${name}!</p>
+<p>Hello ${name}!</p>
import io.jooby.jte.JteModule;
+import io.jooby.jte.JteModule;
{
install(new JteModule(Paths.of("src", "main", "jte"))); (1)
@@ -685,9 +685,9 @@ (2)
});
-}
+}
<plugin>
+<plugin>
<groupId>gg.jte</groupId>
<artifactId>jte-maven-plugin</artifactId>
<version>${jte.version}</version>
@@ -754,9 +754,9 @@
+</plugin>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jwt</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kafka</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
kafka.producer.bootstrap.servers = "localhost:9092"
+kafka.producer.bootstrap.servers = "localhost:9092"
kafka.producer.key.serializer = "org.apache.kafka.common.serialization.StringSerializer"
kafka.producer.value.serializer = "org.apache.kafka.common.serialization.StringSerializer"
kafka.consumer.bootstrap.servers = "localhost:9092"
kafka.consumer.key.deserializer = "org.apache.kafka.common.serialization.StringDeserializer"
-kafka.consumer.value.deserializer = "org.apache.kafka.common.serialization.StringDeserializer"
+kafka.consumer.value.deserializer = "org.apache.kafka.common.serialization.StringDeserializer"
import io.jooby.kafka.KafkaModule;
+import io.jooby.kafka.KafkaModule;
{
install(new KafkaModule()); (1)
@@ -638,9 +638,9 @@
+}
<!-- Metrics Module-->
+<!-- Metrics Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-metrics</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
{
+{
install(new MetricsModule()
.metric("memory", new MemoryUsageGaugeSet())
.metric("threads", new ThreadStatesGaugeSet())
.metric("gc", new GarbageCollectorMetricSet())
.metric("fs", new FileDescriptorRatioGauge()));
-}
+}
{
+{
install(new MetricsModule()
.healthCheck("deadlock", new ThreadDeadlockHealthCheck());
-}
+}
{
+{
use(new MetricsModule());
// inspected route
get("/", context -> "Hello metrics!");
-}
+}
{
+{
install(new MetricsModule()
.threadDump();
-}
+}
{
+{
install(new MetricsModule()
.reporter(registry -> {
ConsoleReporter reporter = ConsoleReporter.forRegistry(registry)
@@ -767,9 +767,9 @@
+}
{
+{
MetricRegistry metricRegistry = new MetricRegistry();
HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry();
@@ -805,9 +805,9 @@
+}
{
+{
install(new MetricsModule("/diag")
.threadDump();
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-node</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
{
+{
"name": "myapp",
"version": "1.0.0",
"scripts": {
"build": "echo \"Default task\"" (1)
}
-}
+}
import io.jooby.node.NpmModule;
+import io.jooby.node.NpmModule;
{
install(new NpmModule("v12.16.1")); (2)
-}
+}
import io.jooby.node.NpmModule;
+import io.jooby.node.NpmModule;
{
install(new NpmModule("v12.16.1")
.execute("run", "local") (1)
);
-}
+}
<properties>
+<properties>
<application.class>myapp.App</application.class>
</properties>
...
@@ -629,7 +629,7 @@ <
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
- <version>3.2.5</version>
+ <version>3.2.6</version>
<executions>
<execution>
<goals>
@@ -638,12 +638,12 @@ <
</execution>
</executions>
</plugin>
-</plugins>
+</plugins>
<dependency>
+<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.22</version>
-</dependency>
+</dependency>
@OpenAPIDefinition(
+@OpenAPIDefinition(
info = @Info(
title = "Title",
description = "description",
@@ -966,9 +966,9 @@
+}
@Tag(name = "Pets", description = "Pet operations")
+@Tag(name = "Pets", description = "Pet operations")
class App extends Jooby {
{
// All routes now have the default tag: `Pets`
}
-}
+}
@Tag(name = "Pets", description = "Pet operations")
+@Tag(name = "Pets", description = "Pet operations")
@Path("/pets")
class Pets {
// All web method now have the default tag: `Pets`
-}
+}
@Tag(name = "Pets", description = "Pet operations")
+@Tag(name = "Pets", description = "Pet operations")
public List<Pet> list(Context ctx) {
...
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-swagger-ui</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-redoc</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-pac4j</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.pac4j.Pac4jModule;
+import io.jooby.pac4j.Pac4jModule;
{
install(new Pac4jModule()); (1)
@@ -629,9 +629,9 @@ (2)
return "Hello " + user.getId();
});
-}
+}
<dependency>
+<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oidc</artifactId>
<version>5.7.0</version>
-</dependency>
+</dependency>
oidc.clientId = 167480702619-8e1lo80dnu8bpk3k0lvvj27noin97vu9.apps.googleusercontent.com
-oidc.secret = MhMme_Ik6IH2JMnAT6MFIfee
+oidc.clientId = 167480702619-8e1lo80dnu8bpk3k0lvvj27noin97vu9.apps.googleusercontent.com
+oidc.secret = MhMme_Ik6IH2JMnAT6MFIfee
import io.jooby.pac4j.Pac4jModule;
+import io.jooby.pac4j.Pac4jModule;
{
install(new Pac4jModule()
@@ -720,9 +720,9 @@
+}
<dependency>
+<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oauth</artifactId>
<version>5.7.0</version>
-</dependency>
+</dependency>
<dependency>
+<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-jwt</artifactId>
<version>5.7.0</version>
-</dependency>
+</dependency>
jwt.salt = CoxUiYwQOSFDReZYdjigBA
+jwt.salt = CoxUiYwQOSFDReZYdjigBA
import io.jooby.pac4j.Pac4jModule;
+import io.jooby.pac4j.Pac4jModule;
{
install(new Pac4jModule()
@@ -866,9 +866,9 @@
+}
import io.jooby.pac4j.Pac4jModule;
+import io.jooby.pac4j.Pac4jModule;
{
install(new Pac4jModule()
@@ -907,9 +907,9 @@ <
return ...;
})
);
-}
+}
{
+{
install(
new Pac4jModule()
.client("/api/*", new MyTestAuthorizer(), conf -> {...});
);
-}
+}
{
+{
install(
new Pac4jModule()
.client("/api/*", MyTestAuthorizer.class, conf -> {...});
);
-}
+}
import io.jooby.pac4j.Pac4jModule;
+import io.jooby.pac4j.Pac4jModule;
import org.pac4j.core.config.Config;
{
@@ -996,9 +996,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-pebble</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<p> Hello {{name}}! </p>
+<p> Hello {{name}}! </p>
import io.jooby.pebble.PebbleModule;
+import io.jooby.pebble.PebbleModule;
{
install(new PebbleModule());
@@ -630,9 +630,9 @@
+}
import io.jooby.pebble.PebbleModule;
+import io.jooby.pebble.PebbleModule;
{
// Apply custom configuration via builder
@@ -684,9 +684,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-quartz</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.quartz.QuartzModule;
+import io.jooby.quartz.QuartzModule;
{
install(new QuartzModule(SampleJob.class));
-}
+}
import io.quartz.Scheduled;
+import io.quartz.Scheduled;
import org.quartz.Job;
@@ -652,9 +652,9 @@
+}
import io.quartz.Scheduled;
+import io.quartz.Scheduled;
public class SampleJob {
@@ -699,9 +699,9 @@
+}
import io.quartz.Scheduled;
+import io.quartz.Scheduled;
public class SampleJob {
@@ -742,9 +742,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hikari</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.hikari.HikariModule;
+import io.jooby.hikari.HikariModule;
import io.jooby.quartz.QuartzModule;
{
install(new HikariModule());
install(new QuartzModule(SampleJob.class));
-}
+}
db.url = "jdbc:mysql://localhost/mydb"
+db.url = "jdbc:mysql://localhost/mydb"
db.user = "myuser"
db.password = "mypassword"
-org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
# Set number of threads to use, default is to use the number of available processor
-org.quartz.threadPool.threadCount = 2
+# Set number of threads to use, default is to use the number of available processor
+org.quartz.threadPool.threadCount = 2
{
+{
Scheduler scheduler = QuartzModule.newScheduler(this);
// configure scheduler as you need it
install(new QuartzModule(scheduler, SampleJob.class));
-}
+}
org.quartz.jobs.SampleJob.execute.enabled = false
+org.quartz.jobs.SampleJob.execute.enabled = false
import io.jooby.quartz.QuartzApp
+import io.jooby.quartz.QuartzApp
import io.jooby.quartz.QuartzModule;
{
install(new QuartzModule(SampleJob.class));
use("/scheduler", new QuartzApp());
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-redis</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
redis = "redis://localhost:6379"
+redis = "redis://localhost:6379"
import io.jooby.redis.RedisModule;
+import io.jooby.redis.RedisModule;
import io.lettuce.core.api.StatefulRedisConnection;
{
@@ -631,9 +631,9 @@ (2)
// work with redis
});
-}
+}
import io.jooby.redis.RedisModule;
+import io.jooby.redis.RedisModule;
import io.lettuce.core.api.StatefulRedisConnection;
{
@@ -710,9 +710,9 @@
+}
foo = "redis://server1:6379"
+foo = "redis://server1:6379"
-bar = "redis://server2:6379"
+bar = "redis://server2:6379"
import io.jooby.redis.RedisModule;
+import io.jooby.redis.RedisModule;
import io.jooby.redis.RedisSessionStore;
import io.lettuce.core.RedisClient;
@@ -762,9 +762,9 @@ (3)
// HTTP session is backed by Redis
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-rocker</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<plugin>
+<plugin>
<groupId>com.fizzed</groupId>
<artifactId>rocker-maven-plugin</artifactId>
<version>1.4.0</version>
@@ -627,9 +627,9 @@
+</plugin>
@args (String message)
+@args (String message)
-<p>Hello @message!</p>
+<p>Hello @message!</p>
import io.jooby.rocker.RockerModule;
+import io.jooby.rocker.RockerModule;
{
install(new RockerModule()); (1)
@@ -680,9 +680,9 @@ (2)
});
-}
+}
import io.jooby.rocker.RockerModule;
+import io.jooby.rocker.RockerModule;
{
install(new RockerModule().bufferSize(1024));
-}
+}
import io.jooby.rocker.RockerModule;
+import io.jooby.rocker.RockerModule;
{
install(new RockerModule().reuseBuffer(true));
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-thymeleaf</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
<!DOCTYPE html>
+<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>
<p>
Hello <span th:text="${name}">World</span>
</p>
</body>
-</html>
+</html>
import io.jooby.thymeleaf.ThymeleafModule;
+import io.jooby.thymeleaf.ThymeleafModule;
{
install(new ThymeleafModule());
@@ -637,9 +637,9 @@
+}
import io.jooby.thymeleaf.ThymeleafModule;
+import io.jooby.thymeleaf.ThymeleafModule;
{
TemplateEngine templateEngine = new TemplateEngine();
// configure as need it
install(new ThymeleafModule(templateEngine));
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-whoops</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.whoops.WhoopsModule;
+import io.jooby.whoops.WhoopsModule;
{
install(new WhoopsModule()); (1)
@@ -622,9 +622,9 @@ (2)
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-yasson</artifactId>
- <version>3.2.5</version>
-</dependency>
+ <version>3.2.6</version>
+</dependency>
import io.jooby.json.YassonModule;
+import io.jooby.json.YassonModule;
{
install(new YassonModule()); (1)
@@ -624,9 +624,9 @@ (3)
...
});
-}
+}
import io.jooby.json.YassonModule;
+import io.jooby.json.YassonModule;
{
install(new YassonModule());
@@ -677,15 +677,15 @@
+}
import io.jooby.json.YassonModule;
+import io.jooby.json.YassonModule;
{
Jsonb jsonb = JsonbBuilder.create();
install(new YassonModule(jsonb));
-}
+}
<build>
+ <build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -631,15 +631,15 @@
+ </build>
dependencies {
- annotationProcessor "io.jooby:jooby-apt:3.2.5"
-}
+dependencies {
+ annotationProcessor "io.jooby:jooby-apt:3.2.6"
+}
<build>
+ <build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -847,9 +847,9 @@
+ </build>
tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
options.debug = true
-}
+}