// Path: web-api/DropwizardHelloWorld/src/main/java/com/skeleton/config/MyConfiguration.java
// public class MyConfiguration extends Configuration {
// 
//     @NotEmpty
//     private String template;
// 
//     @NotEmpty
//     private String defaultName = "DefaultName";
// 
//     @JsonProperty
//     public String getTemplate() {
//         return template;
//     }
// 
//     @JsonProperty
//     public void setTemplate(String template) {
//         this.template = template;
//     }
// 
//     @JsonProperty
//     public String getDefaultName() {
//         return defaultName;
//     }
// 
//     @JsonProperty
//     public void setDefaultName(String name) {
//         this.defaultName = name;
//     }
// }
// 
// Path: web-api/DropwizardHelloWorld/src/main/java/com/skeleton/resources/MyResource.java
// @Path("/greet")
// @Produces(MediaType.APPLICATION_JSON)
// public class MyResource {
// 
//     private final String template;
//     private final String defaultName;
//     private final AtomicLong counter;
// 
//     public MyResource(String template, String defaultName) {
//         this.template = template;
//         this.defaultName = defaultName;
//         this.counter = new AtomicLong();
//     }
// 
//     @GET
//     @Timed
//     public MyBean sayHello(@QueryParam("name") Optional<String> name) {
//         // the variable name may or maynot exist, thats why optional
//         final String value = String.format(template, name.orElse(defaultName));
//         return new MyBean(counter.incrementAndGet(), value);
//     }
// }


import com.skeleton.config.MyConfiguration;
import com.skeleton.resources.MyResource;
import io.dropwizard.Application;
import io.dropwizard.setup.Environment;
package com.skeleton.app;


/**
 * The main entry point of the application
 *
 * @author saifasif
 */
public class MyApplication extends Application<MyConfiguration> {

    public static void main(String[] args) throws Exception {
        new MyApplication().run(args);
    }

    @Override
    public void run(MyConfiguration configuration, Environment environment) throws Exception {
        // each resource has to be registered here individually
// Path: web-api/DropwizardHelloWorld/src/main/java/com/skeleton/config/MyConfiguration.java
// public class MyConfiguration extends Configuration {
// 
//     @NotEmpty
//     private String template;
// 
//     @NotEmpty
//     private String defaultName = "DefaultName";
// 
//     @JsonProperty
//     public String getTemplate() {
//         return template;
//     }
// 
//     @JsonProperty
//     public void setTemplate(String template) {
//         this.template = template;
//     }
// 
//     @JsonProperty
//     public String getDefaultName() {
//         return defaultName;
//     }
// 
//     @JsonProperty
//     public void setDefaultName(String name) {
//         this.defaultName = name;
//     }
// }
// 
// Path: web-api/DropwizardHelloWorld/src/main/java/com/skeleton/resources/MyResource.java
// @Path("/greet")
// @Produces(MediaType.APPLICATION_JSON)
// public class MyResource {
// 
//     private final String template;
//     private final String defaultName;
//     private final AtomicLong counter;
// 
//     public MyResource(String template, String defaultName) {
//         this.template = template;
//         this.defaultName = defaultName;
//         this.counter = new AtomicLong();
//     }
// 
//     @GET
//     @Timed
//     public MyBean sayHello(@QueryParam("name") Optional<String> name) {
//         // the variable name may or maynot exist, thats why optional
//         final String value = String.format(template, name.orElse(defaultName));
//         return new MyBean(counter.incrementAndGet(), value);
//     }
// }


// Path: web-api/DropwizardHelloWorld/src/main/java/com/skeleton/app/MyApplication.java
import com.skeleton.config.MyConfiguration;
import com.skeleton.resources.MyResource;
import io.dropwizard.Application;
import io.dropwizard.setup.Environment;

package com.skeleton.app;


/**
 * The main entry point of the application
 *
 * @author saifasif
 */
public class MyApplication extends Application<MyConfiguration> {

    public static void main(String[] args) throws Exception {
        new MyApplication().run(args);
    }

    @Override
    public void run(MyConfiguration configuration, Environment environment) throws Exception {
        // each resource has to be registered here individually
        final MyResource resource = new MyResource(