Skip to content

SDA Commons Shared Forms

javadoc

The module sda-commons-shared-forms adds all required dependencies to support multipart/* in Dropwizard applications.

Clients will be automatically configured to support multipart/* if this module is available.

To support multipart/* as a server, Dropwizard's io.dropwizard.forms.MultiPartBundle has to be added:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
public class MyApplication extends Application<MyConfiguration> {

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

   @Override
   public void initialize(Bootstrap<MyConfiguration> bootstrap) {
      // ...
      bootstrap.addBundle(new io.dropwizard.forms.MultiPartBundle());
      // ...
   }

   @Override
   public void run(MyConfiguration configuration, Environment environment) {
      // ...
   }
}