jooby set -w ~/Source
+jooby set -w ~/Source
diff --git a/index.html b/index.html index 1743eb5..c7799db 100644 --- a/index.html +++ b/index.html @@ -570,7 +570,7 @@
import io.jooby.Jooby;
+import io.jooby.Jooby;
public class App extends Jooby {
@@ -943,15 +943,15 @@
+}
Looking for a previous version?
@@ -1028,7 +1028,7 @@import io.jooby.Jooby;
+import io.jooby.Jooby;
public class App extends Jooby {
@@ -1039,9 +1039,9 @@
+}
import io.jooby.annotation.*;
+import io.jooby.annotation.*;
public class MyController {
@@ -1124,9 +1124,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.1.3</version>
-</dependency>
+ <version>3.2.0</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");
@@ -1521,9 +1521,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();
@@ -1563,9 +1563,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)
@@ -1802,9 +1802,9 @@ (3)
return path;
});
-}
+}
{
+{
get("/user/{id}", ctx -> ctx.path("id").value()); (1)
get("/user/me", ctx -> "my profile"); (2)
@@ -1889,9 +1889,9 @@ (3)
get("/users", ctx -> "new users"); (4)
-}
+}
interface Filter {
+interface Filter {
Handler apply(Handler next);
-}
+}
{
+{
use(next -> ctx -> {
long start = System.currentTimeMillis(); (1)
@@ -1966,9 +1966,9 @@ <
get("/", ctx -> {
return "filter";
});
-}
+}
interface Before {
+interface Before {
void apply(Context ctx);
-}
+}
{
+{
before(ctx -> {
ctx.setResponseHeader("Server", "Jooby");
});
@@ -2052,9 +2052,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)
@@ -2145,9 +2145,9 @@
+}
{
+{
after((ctx, result, failure) -> {
if (ctx.isResponseStarted()) {
// Don't modify response
@@ -2192,9 +2192,9 @@
+}
{
+{
after((ctx, result, failure) -> {
if (failure == null) {
db.commit(); (1)
@@ -2236,9 +2236,9 @@ (2)
}
});
-}
+}
{
+{
after((ctx, result, failure) -> {
if (failure instanceOf MyBusinessException) {
ctx.send("Recovering from something"); (1)
}
});
-}
+}
{
+{
after((ctx, result, failure) -> {
...
throw new AnotherException();
@@ -2306,9 +2306,9 @@ (1)
Throwable anotherException = failure.getSuppressed()[0]; (2)
});
-}
+}
{
+{
use(next -> ctx -> {
long start = System.currentTimeInMillis();
ctx.onComplete(context -> { (1)
@@ -2361,9 +2361,9 @@
+}
{
+{
// Increment +1
use(next -> ctx -> {
Number n = (Number) next.apply(ctx);
@@ -2416,9 +2416,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);
@@ -2546,9 +2546,9 @@ <
});
get("/2", ctx -> 2); (2)
-}
+}
{
+{
// Increment +1
use(next -> ctx -> {
Number n = (Number) next.apply(ctx);
@@ -2614,9 +2614,9 @@ (3)
-}
+}
{
+{
routes(() -> {
get("/", ctx -> "Hello");
});
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", Context::getRequestPath);
}
@@ -2784,9 +2784,9 @@ (3)
}
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", Context::getRequestPath);
}
@@ -2837,9 +2837,9 @@ (1)
}
-}
+}
public class Foo extends Jooby {
+public class Foo extends Jooby {
{
get("/foo", ctx -> ...);
}
@@ -2893,9 +2893,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");
}
@@ -2987,9 +2987,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;
...
{
@@ -3058,9 +3058,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;
...
{
@@ -3136,9 +3136,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)
@@ -3413,9 +3413,9 @@ (4)
get("/{id:[0-9]+}", ctx -> ctx.path("id)) (5)
-}
+}
{
+{
get("/{name}", ctx -> {
String pathString = ctx.getRequestPath(); (1)
@@ -3468,9 +3468,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;
});
@@ -4054,9 +4054,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)
@@ -4153,9 +4153,9 @@ (4)
...
});
-}
+}
{
+{
get("/search", ctx -> {
String q = ctx.query("q").value("*:*"); (1)
return q;
@@ -4272,9 +4272,9 @@ (2)
return q;
});
-}
+}
{
+{
get("/", ctx -> {
Value user = ctx.query("user"); (1)
String name = user.get("name").value(); (2)
@@ -4442,9 +4442,9 @@ (4)
...
}}
-}
+}
class Member {
+class Member {
public final String firstname;
public final String lastName;
@@ -4546,11 +4546,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;
@@ -4700,9 +4700,9 @@ PO
public Member(@Named("first-name") String firstname, @Named("last-name") String lastname) {
....
}
-}
+}
{
+{
post("/string", ctx -> {
String body = ctx.body().value(); (1)
...
@@ -4735,9 +4735,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)
@@ -4808,9 +4808,9 @@ (5)
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
{
+{
get("/", ctx -> {
ctx.setResponseCode(200); (1)
@@ -4898,9 +4898,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)
@@ -4970,9 +4970,9 @@ (6)
});
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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 App extends Jooby {
+public class App extends Jooby {
{
mvc(MyController.class);
}
@@ -5226,15 +5226,15 @@
+}
import jakarta.inject.Provider;
+import jakarta.inject.Provider;
public class App extends Jooby {
{
@@ -5271,9 +5271,9 @@
+}
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 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());
}
@@ -5807,15 +5807,15 @@ (1)
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
dispatch(() -> {
mvc(new MyBlockingController()); (1)
@@ -5843,9 +5843,9 @@
+}
public class MyController {
+public class MyController {
@GET("/nonblocking")
public String nonblocking() { (1)
return "I'm nonblocking";
@@ -5883,9 +5883,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")
@@ -5992,9 +5992,9 @@
+}
<plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
@@ -6100,9 +6100,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 -> {
@@ -6373,9 +6373,9 @@
+}
{
+{
install(new MyTemplateEngineModule()); (1)
get("/", ctx -> {
MyModel model = ...; (2)
return new ModelAndView("index.html", model); (3)
});
-}
+}
{
+{
install(new MyTemplateEngineModule());
get("/", ctx -> {
@@ -6453,9 +6453,9 @@ (1)
});
-}
+}
{
+{
install(new HandlebarsModule()); (1)
install(new FreemarkerModule()); (2)
@@ -6525,9 +6525,9 @@ (4)
});
-}
+}
{
+{
get("/", ctx -> {
Session session = ctx.session(); (1)
@@ -6651,9 +6651,9 @@ (3)
});
-}
+}
{
+{
setSessionStore(SessionStore.memory(new Cookie("SESSION"))); (1)
get("/", ctx -> {
@@ -6697,9 +6697,9 @@
+}
{
+{
setSessionStore(SessionStore.memory(SessionToken.header("TOKEN"))); (1)
get("/", ctx -> {
@@ -6737,9 +6737,9 @@
+}
{
+{
setSessionStore(SessionStore.memory(SessionToken.comibe(SessionToken.cookie("SESSION"), SessionToken.header("TOKEN")))); (1)
get("/", ctx -> {
@@ -6777,9 +6777,9 @@
+}
{
+{
String secret = "super secret key"; (1)
setSessionStore(SessionStore.signed(secret)); (2)
@@ -6835,9 +6835,9 @@
+}
{
+{
String secret = "super secret key"; (1)
setSessionStore(SessionStore.signed(secret, SessionToken.header("TOKEN"))); (2)
@@ -6883,9 +6883,9 @@
+}
{
+{
ws("/ws", (ctx, configurer) -> { (1)
configurer.onConnect(ws -> {
ws.send("Connected"); (2)
@@ -6950,9 +6950,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)
@@ -7055,9 +7055,9 @@ (3)
})
});
-}
+}
import io.jooby.jackson.JacksonModule;
+import io.jooby.jackson.JacksonModule;
{
install(new JackonModule()); (1)
@@ -7105,9 +7105,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 {
@@ -7346,16 +7346,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 {
@@ -7398,9 +7398,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 {
@@ -7459,9 +7459,9 @@
+}
import static io.jooby.ExecutionMode.WORKER;
+import static io.jooby.ExecutionMode.WORKER;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7511,9 +7511,9 @@
+}
import static io.jooby.ExecutionMode.WORKER;
+import static io.jooby.ExecutionMode.WORKER;
import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7553,9 +7553,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -7642,9 +7642,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)
@@ -7864,9 +7864,9 @@ (3)
});
-}
+}
{
+{
get("/chunk", ctx -> {
return ctx.responseWriter(writer -> { (1)
writer.write("chunk1"); (2)
@@ -7910,9 +7910,9 @@
+}
{
+{
get("/download-file", ctx -> {
Path source = Paths.get("logo.png");
return new AttachedFile(source); (1)
@@ -7945,9 +7945,9 @@ (2)
});
-}
+}
FileDownload.Builder produceDownload(Context ctx) {
+FileDownload.Builder produceDownload(Context ctx) {
return FileDownload.build(...);
}
@@ -7988,9 +7988,9 @@
+}
{
+{
mode(EVENT_LOOP); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8033,9 +8033,9 @@ <
... (4)
});
})
-}
+}
{
+{
mode(WORKER); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8089,9 +8089,9 @@ <
... (4)
});
})
-}
+}
{
+{
mode(DEFAULT); (1)
use(ReactiveSupport.concurrent()); (2)
@@ -8145,9 +8145,9 @@ <
... (4)
});
})
-}
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-mutiny</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
import io.jooby.mutiny;
+import io.jooby.mutiny;
import io.smallrye.mutiny.Uni;
{
@@ -8270,9 +8270,9 @@ Uni
.completionStage(supplyAsync(() -> "Uni"))
.map(it -> "Hello " + it);
})
-}
+}
import io.jooby.mutiny;
+import io.jooby.mutiny;
import io.smallrye.mutiny.Multi;
{
@@ -8305,9 +8305,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-rxjava3</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
import io.jooby.rxjava3.Reactivex;
+import io.jooby.rxjava3.Reactivex;
{
use(Reactivex.rx());
@@ -8385,9 +8385,9 @@
+}
import io.jooby.rxjava3.Reactivex;
+import io.jooby.rxjava3.Reactivex;
{
use(Reactivex.rx());
@@ -8416,9 +8416,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-reactor</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
import io.jooby.Reactor;
+import io.jooby.Reactor;
{
use(Reactor.reactor());
@@ -8497,9 +8497,9 @@ Mo
.fromCallable(() -> "Mono")
.map(it -> "Hello " + it);
})
-}
+}
import io.jooby.Reactor;
+import io.jooby.Reactor;
{
use(Reactor.reactor())
@@ -8528,9 +8528,9 @@ Fl
return Flux.range(1, 10)
.map(it -> it + ", ");
})
-}
+}
{
+{
coroutine {
get("/") {
delay(100) (1)
"Hello Coroutines!" (2)
}
}
-}
+}
{
+{
coroutine {
get("/") {
ctx.doSomething() (1)
@@ -8613,7 +8613,7 @@ (2)
return "Hello Coroutines!" (3)
-}
+}
{
+{
worker(Executors.newCachedThreadPool())
coroutine {
@@ -8653,7 +8653,7 @@ (3)
}
}
-}
+}
{
+{
coroutine(CoroutineStart.UNDISPATCHED) {
get("/") {
val n = 5 * 5 (1)
@@ -8690,7 +8690,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;
{
@@ -8963,9 +8963,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;
...
{
@@ -9114,9 +9114,9 @@
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.CorsHandler;
...
{
@@ -9227,9 +9227,9 @@
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.CorsHandler;
...
{
@@ -9289,9 +9289,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;
...
{
@@ -9454,15 +9454,15 @@ (1)
// other routes go here
-}
+}
import io.jooby.Jooby;
+import io.jooby.Jooby;
import io.jooby.HeadHandler;
...
{
@@ -9522,9 +9522,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;
...
{
@@ -9838,9 +9838,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>
@@ -10340,17 +10340,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.1.3</version>
-</dependency>
+ <version>3.2.0</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 {
@@ -10575,9 +10575,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 {
@@ -10728,9 +10728,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-test</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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 {
@@ -10845,9 +10845,9 @@
+}
@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 {
@@ -11012,9 +11012,9 @@ (2)
return new App("Argument"); (3)
}
-}
+}
<plugins>
+<plugins>
...
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
- <version>3.1.3</version>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
<configuration>
<mainClass>${application.class}</mainClass> (1)
<restartExtensions>conf,properties,class</restartExtensions> (2)
@@ -11180,17 +11180,17 @@ <
</configuration>
</plugin>
...
-</plugins>
+</plugins>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jetty</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-netty</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-undertow</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
import io.jooby.netty.NettyServer;
+import io.jooby.netty.NettyServer;
{
install(new NettyServer());
-}
+}
{
+{
setServerOptions(new ServerOptions()
.setBufferSize(16384)
.setCompressionLevel(6)
@@ -11605,9 +11605,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)
@@ -11950,16 +11950,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.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
{
+{
setServerOptions(new ServerOptions()
.setHttp2(true)
.setSecurePort(8433)
@@ -12123,9 +12123,9 @@
+}
import io.jooby.Extension;
+import io.jooby.Extension;
public class MyExtension implements Extension {
@@ -12201,9 +12201,9 @@ (4)
}
-}
+}
public class App extends Jooby {
+public class App extends Jooby {
{
install(new MyExtension()); (1)
@@ -12253,9 +12253,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-inject</artifactId>
<version>1.1.0</version>
-</dependency>
+</dependency>
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -12338,9 +12338,9 @@
+}
currency = USD
+currency = USD
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -12416,15 +12416,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>
@@ -12489,15 +12489,15 @@
+</build>
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12525,9 +12525,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12593,9 +12593,9 @@
+}
import static io.jooby.Jooby.runApp;
+import static io.jooby.Jooby.runApp;
public class App extends Jooby {
@@ -12643,9 +12643,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-guice</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
import io.jooby.guice.GuiceModule;
+import io.jooby.guice.GuiceModule;
import io.jooby.kt.runApp;
public class App extends Jooby {
@@ -12713,9 +12713,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 {
@@ -12798,9 +12798,9 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kotlin</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
{
+{
use("*", (req, rsp, chain) -> {
System.out.println("first");
// Moves execution to next handler: second
@@ -13610,7 +13610,7 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kotlin</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-inject</artifactId>
<version>1.1.0</version>
-</dependency>
+</dependency>
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -618,9 +618,9 @@
+}
currency = USD
+currency = USD
public class App extends Jooby {
+public class App extends Jooby {
{
install(AvajeInjectModule.of()); (1)
@@ -696,15 +696,15 @@
+}
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-avaje-jsonb</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- Ebean Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-ebean</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- Flyway Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-flyway</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- JSON library-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- GraphQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphql</artifactId>
- <version>3.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- GraphIQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphiql</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- GraphQL-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphql</artifactId>
- <version>3.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- GraphQL Playground-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-graphiql-playground</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- Hibernate Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-hibernate</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</version>
</dependency>
<!-- Jdbi Module-->
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jdbi</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-kafka</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-redoc</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</version>
+</dependency>
<dependency>
+<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-pac4j</artifactId>
- <version>3.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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.1.3</version>
-</dependency>
+ <version>3.2.0</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,20 +631,20 @@
+ </build>
dependencies {
- annotationProcessor "io.jooby:jooby-apt:3.1.3"
-}
+dependencies {
+ annotationProcessor "io.jooby:jooby-apt:3.2.0"
+}
<build>
+ <build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -847,14 +847,14 @@
+ </build>
tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
options.debug = true
-}
+}