|
1 | 1 | package com.baeldung.bootique; |
2 | 2 |
|
3 | | -import java.util.function.Supplier; |
4 | | - |
5 | 3 | import com.baeldung.bootique.module.ModuleBinder; |
6 | 4 | import com.baeldung.bootique.router.IndexController; |
7 | 5 | import com.baeldung.bootique.router.SaveController; |
8 | 6 | import com.google.inject.Module; |
9 | | - |
10 | 7 | import io.bootique.Bootique; |
11 | 8 | import io.bootique.jersey.JerseyModule; |
12 | 9 | import io.bootique.log.BootLogger; |
13 | 10 |
|
| 11 | +import java.util.function.Supplier; |
| 12 | + |
14 | 13 | public class App { |
15 | 14 |
|
16 | | - public static void main(String[] args) { |
17 | | - Module module = binder -> JerseyModule.extend(binder).addResource(IndexController.class) |
18 | | - .addResource(SaveController.class); |
19 | | - Bootique.app(args).module(module).module(ModuleBinder.class).bootLogger(new BootLogger() { |
20 | | - @Override |
21 | | - public void trace(Supplier<String> arg0) { |
22 | | - // ... |
23 | | - } |
24 | | - |
25 | | - @Override |
26 | | - public void stdout(String arg0) { |
27 | | - // ... |
28 | | - } |
29 | | - |
30 | | - @Override |
31 | | - public void stderr(String arg0, Throwable arg1) { |
32 | | - // ... |
33 | | - } |
34 | | - |
35 | | - @Override |
36 | | - public void stderr(String arg0) { |
37 | | - // ... |
38 | | - } |
39 | | - }).autoLoadModules().exec(); |
40 | | - } |
| 15 | + public static void main(String[] args) { |
| 16 | + Module module = binder -> JerseyModule.extend(binder).addResource(IndexController.class) |
| 17 | + .addResource(SaveController.class); |
| 18 | + Bootique.app(args).module(module).module(ModuleBinder.class).bootLogger(new BootLogger() { |
| 19 | + @Override |
| 20 | + public void trace(Supplier<String> arg0) { |
| 21 | + // ... |
| 22 | + } |
| 23 | + |
| 24 | + @Override |
| 25 | + public void stdout(String arg0) { |
| 26 | + // ... |
| 27 | + } |
| 28 | + |
| 29 | + @Override |
| 30 | + public void stderr(String arg0, Throwable arg1) { |
| 31 | + // ... |
| 32 | + } |
| 33 | + |
| 34 | + @Override |
| 35 | + public void stderr(String arg0) { |
| 36 | + // ... |
| 37 | + } |
| 38 | + }).autoLoadModules().exec(); |
| 39 | + } |
41 | 40 |
|
42 | 41 | } |
0 commit comments