diff --git a/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java b/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java
index dd80a7971c..a9b92d9f4a 100644
--- a/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java
+++ b/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java
@@ -21,3 +21,4 @@ public class CyclicBarrierExample {
}
}
}
+
diff --git a/jooby/conf/application.conf b/jooby/conf/application.conf
new file mode 100644
index 0000000000..2f89e0eb6b
--- /dev/null
+++ b/jooby/conf/application.conf
@@ -0,0 +1,2 @@
+#application.secret = 2o128940921eo298e21
+#db = /url/to/the/datastore
\ No newline at end of file
diff --git a/jooby/conf/logback.xml b/jooby/conf/logback.xml
new file mode 100644
index 0000000000..50733ee6d6
--- /dev/null
+++ b/jooby/conf/logback.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
+
+
+
+
+ log/jooby.log
+
+ log/jooby.%d{yyyy-MM-dd}.log
+ 1mb
+ 7
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
+
+
+
+
+ log/access.log
+
+ log/access.%d{yyyy-MM-dd}.log
+ 1mb
+ 7
+
+
+
+ %msg%n
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jooby/pom.xml b/jooby/pom.xml
new file mode 100644
index 0000000000..1935c646ee
--- /dev/null
+++ b/jooby/pom.xml
@@ -0,0 +1,56 @@
+
+
+ 4.0.0
+ jooby
+ com.baeldung.jooby
+ 1.0
+ jooby
+
+
+ org.jooby
+ modules
+ 1.1.3
+
+
+
+ 1.1.3
+ com.baeldung.jooby.App
+
+
+
+
+ org.jooby
+ jooby-netty
+
+
+ org.jooby
+ jooby-jedis
+ 1.1.3
+
+
+ ch.qos.logback
+ logback-classic
+
+
+ junit
+ junit
+ test
+
+
+ io.rest-assured
+ rest-assured
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+
+
+
+
+
diff --git a/jooby/public/form.html b/jooby/public/form.html
new file mode 100644
index 0000000000..a23620812a
--- /dev/null
+++ b/jooby/public/form.html
@@ -0,0 +1,17 @@
+
+
+
+
+Insert title here
+
+
+
+
+
\ No newline at end of file
diff --git a/jooby/public/welcome.html b/jooby/public/welcome.html
new file mode 100644
index 0000000000..cd21fb1988
--- /dev/null
+++ b/jooby/public/welcome.html
@@ -0,0 +1,10 @@
+
+
+
+
+Insert title here
+
+
+i m welcomed
+
+
\ No newline at end of file
diff --git a/jooby/src/etc/stork.yml b/jooby/src/etc/stork.yml
new file mode 100644
index 0000000000..f2f2790cd1
--- /dev/null
+++ b/jooby/src/etc/stork.yml
@@ -0,0 +1,41 @@
+# Name of application (make sure it has no spaces)
+name: "${project.artifactId}"
+
+# Display name of application (can have spaces)
+display_name: "${project.name}"
+
+# Type of launcher (CONSOLE or DAEMON)
+type: DAEMON
+
+# Java class to run
+main_class: "${application.class}"
+
+domain: "${project.groupId}"
+
+short_description: "${project.artifactId}"
+
+# Platform launchers to generate (WINDOWS, LINUX, MAC_OSX)
+# Linux launcher is suitable for Bourne shells (e.g. Linux/BSD)
+platforms: [ LINUX ]
+
+# Working directory for app
+# RETAIN will not change the working directory
+# APP_HOME will change the working directory to the home of the app
+# (where it was intalled) before running the main class
+working_dir_mode: RETAIN
+
+# Minimum version of java required (system will be searched for acceptable jvm)
+min_java_version: "1.8"
+
+# Min/max fixed memory (measured in MB)
+min_java_memory: 512
+max_java_memory: 512
+
+# Min/max memory by percentage of system
+#min_java_memory_pct: 10
+#max_java_memory_pct: 20
+
+# Try to create a symbolic link to java executable in /run with
+# the name of "-java" so that commands like "ps" will make it
+# easier to find your app
+symlink_java: true
diff --git a/jooby/src/main/java/com/baeldung/jooby/App.java b/jooby/src/main/java/com/baeldung/jooby/App.java
new file mode 100644
index 0000000000..94a24048c2
--- /dev/null
+++ b/jooby/src/main/java/com/baeldung/jooby/App.java
@@ -0,0 +1,95 @@
+package com.baeldung.jooby;
+
+import org.jooby.Jooby;
+import org.jooby.Mutant;
+import org.jooby.Session;
+import org.jooby.jedis.Redis;
+import org.jooby.jedis.RedisSessionStore;
+
+import com.baeldung.jooby.bean.Employee;
+
+public class App extends Jooby {
+
+ {
+ port(8080);
+ securePort(8443);
+ }
+
+ {
+ get("/", () -> "Hello World!");
+ }
+
+ {
+ get("/user/{id}", req -> "Hello user : " + req.param("id").value());
+ get("/user/:id", req -> "Hello user: " + req.param("id").value());
+ get("/uid:{id}", req -> "Hello User with id : uid" + req.param("id").value());
+ }
+
+ {
+ onStart(() -> {
+ System.out.println("starting app");
+ });
+
+ onStop(() -> {
+ System.out.println("stopping app");
+ });
+
+ onStarted(() -> {
+ System.out.println("app started");
+ });
+ }
+
+ {
+ get("/login", () -> "Hello from Baeldung");
+ }
+
+ {
+ post("/save", req -> {
+ Mutant token = req.param("token");
+ return token.intValue();
+ });
+ }
+
+ {
+ {
+ assets("/employee", "form.html");
+ }
+
+ post("/submitForm", req -> {
+ Employee employee = req.params(Employee.class);
+ // TODO
+ return "empoyee data saved successfullly";
+ });
+ }
+
+ {
+ get("/filter", (req, resp, chain) -> {
+ // TODO
+ // resp.send(...);
+ chain.next(req, resp);
+ });
+ get("/filter", (req, resp) -> {
+ resp.send("filter response");
+ });
+ }
+
+ {
+// cookieSession();
+
+// use(new Redis());
+//
+// session(RedisSessionStore.class);
+
+ get("/session", req -> {
+ Session session = req.session();
+ session.set("token", "value");
+ return session.get("token").value();
+ });
+ }
+
+ public static void main(final String[] args) {
+
+ run(App::new, args);
+ }
+
+}
diff --git a/jooby/src/main/java/com/baeldung/jooby/bean/Employee.java b/jooby/src/main/java/com/baeldung/jooby/bean/Employee.java
new file mode 100644
index 0000000000..6e18495ef1
--- /dev/null
+++ b/jooby/src/main/java/com/baeldung/jooby/bean/Employee.java
@@ -0,0 +1,20 @@
+package com.baeldung.jooby.bean;
+
+public class Employee {
+
+ String id;
+ String name;
+ String email;
+ String phone;
+ String address;
+
+ public Employee(String id, String name, String email, String phone, String address) {
+ super();
+ this.id = id;
+ this.name = name;
+ this.email = email;
+ this.phone = phone;
+ this.address = address;
+ }
+
+}
diff --git a/jooby/src/main/java/com/baeldung/jooby/mvc/GetController.java b/jooby/src/main/java/com/baeldung/jooby/mvc/GetController.java
new file mode 100644
index 0000000000..a2c51bae70
--- /dev/null
+++ b/jooby/src/main/java/com/baeldung/jooby/mvc/GetController.java
@@ -0,0 +1,22 @@
+package com.baeldung.jooby.mvc;
+
+import org.jooby.Result;
+import org.jooby.Results;
+import org.jooby.mvc.GET;
+import org.jooby.mvc.Path;
+
+@Path("/hello")
+public class GetController {
+
+ @GET
+ public String hello() {
+ return "Hello Baeldung";
+ }
+
+ @GET
+ @Path("/home")
+ public Result home() {
+ return Results.html("welcome").put("model", new Object());
+ }
+
+}
diff --git a/jooby/src/main/java/com/baeldung/jooby/mvc/PostController.java b/jooby/src/main/java/com/baeldung/jooby/mvc/PostController.java
new file mode 100644
index 0000000000..df00e47da5
--- /dev/null
+++ b/jooby/src/main/java/com/baeldung/jooby/mvc/PostController.java
@@ -0,0 +1,14 @@
+package com.baeldung.jooby.mvc;
+
+import org.jooby.mvc.POST;
+import org.jooby.mvc.Path;
+
+@Path("/submit")
+public class PostController {
+
+ @POST
+ public String hello() {
+ return "Submit Baeldung";
+ }
+
+}
diff --git a/jooby/src/test/java/com/baeldung/jooby/AppTest.java b/jooby/src/test/java/com/baeldung/jooby/AppTest.java
new file mode 100644
index 0000000000..af2626c046
--- /dev/null
+++ b/jooby/src/test/java/com/baeldung/jooby/AppTest.java
@@ -0,0 +1,29 @@
+package com.baeldung.jooby;
+
+import static io.restassured.RestAssured.get;
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertEquals;
+
+import org.jooby.test.JoobyRule;
+import org.jooby.test.MockRouter;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+public class AppTest {
+
+ @ClassRule
+ public static JoobyRule app = new JoobyRule(new App());
+
+ @Test
+ public void given_defaultUrl_expect_fixedString() {
+ get("/").then().assertThat().body(equalTo("Hello World!")).statusCode(200)
+ .contentType("text/html;charset=UTF-8");
+ }
+
+ @Test
+ public void given_defaultUrl_with_mockrouter_expect_fixedString() throws Throwable {
+ String result = new MockRouter(new App()).get("/");
+ assertEquals("Hello World!", result);
+ }
+
+}