-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.java
More file actions
30 lines (24 loc) · 808 Bytes
/
Copy pathApp.java
File metadata and controls
30 lines (24 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package hw;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
public class App extends Application<Config> {
public static void main(String[] args) throws Exception {
new App().run(args);
}
@Override
public String getName() {
return "hw";
}
@Override
public void initialize(Bootstrap<Config> bootstrap) {
// nothing to do yet
}
@Override
public void run(Config config, Environment environment) throws Exception {
final Resource resource = new Resource(config.getDefaultName());
final MyHealthCheck healthCheck = new MyHealthCheck();
environment.healthChecks().register("template", healthCheck);
environment.jersey().register(resource);
}
}