Skip to content

Commit 9ee1920

Browse files
committed
Remove -server flag, fix compile error
1 parent 76e6ea3 commit 9ee1920

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ansible/stubbornjava.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
become: true
88
- role: apps/jvm_app_base
99
app_name: stubbornjava
10-
app_command: "java8 -Denv={{env}} -server -Xmx640m -cp 'stubbornjava-all.jar' com.stubbornjava.webapp.StubbornJavaWebApp"
10+
app_command: "java8 -Denv={{env}} -Xmx640m -cp 'stubbornjava-all.jar' com.stubbornjava.webapp.StubbornJavaWebApp"
1111
become: true

stubbornjava-examples/src/main/java/com/stubbornjava/examples/undertow/handlebars/WebpackServer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import static com.stubbornjava.common.undertow.handlers.CustomHandlers.timed;
44

5+
import java.util.concurrent.TimeUnit;
6+
57
import org.slf4j.Logger;
68
import org.slf4j.LoggerFactory;
79

@@ -82,7 +84,7 @@ private static HttpHandler wrapWithMiddleware(HttpHandler handler) {
8284
private static final HttpHandler ROUTES = new RoutingHandler()
8385
.get("/", timed("home", WebpackServer::home))
8486
.get("/hello", timed("hello", WebpackServer::hello))
85-
.get("/static*", timed("static", CustomHandlers.resource("")))
87+
.get("/static*", timed("static", CustomHandlers.resource("", (int)TimeUnit.HOURS.toSeconds(4))))
8688
.setFallbackHandler(timed("notfound", WebpackServer::notFound))
8789
;
8890

0 commit comments

Comments
 (0)