Class VavrBundle<T extends io.dropwizard.core.Configuration>

  • All Implemented Interfaces:
    io.dropwizard.core.ConfiguredBundle<T>

    public class VavrBundle<T extends io.dropwizard.core.Configuration>
    extends Object
    implements io.dropwizard.core.ConfiguredBundle<T>
    • Constructor Detail

      • VavrBundle

        public VavrBundle()
        Add Vavr support (Jackson, Jersey) to Dropwizard.
      • VavrBundle

        public VavrBundle​(boolean registerMessageBodyWriters)
        Add Vavr support (Jackson, Jersey) to Dropwizard.
        Parameters:
        registerMessageBodyWriters - Register EitherMessageBodyWriter and ValueMessageBodyWriter in ObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such as Either, Option, and Lazy with Jackson. Use with care!
      • VavrBundle

        public VavrBundle​(io.vavr.jackson.datatype.VavrModule.Settings settings,
                          boolean registerMessageBodyWriters)
        Add Vavr support (Jackson, Jersey) to Dropwizard.
        Parameters:
        settings - Settings for Jackson VavrModule
        registerMessageBodyWriters - Register EitherMessageBodyWriter and ValueMessageBodyWriter in ObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such as Either, Option, and Lazy with Jackson. Use with care!
    • Method Detail

      • initialize

        public void initialize​(io.dropwizard.core.setup.Bootstrap<?> bootstrap)
        Specified by:
        initialize in interface io.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
      • run

        public void run​(T configuration,
                        io.dropwizard.core.setup.Environment environment)
        Specified by:
        run in interface io.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
      • newValidatorFactory

        protected javax.validation.ValidatorFactory newValidatorFactory()
        Creates a new ValidatorFactory based on newValidatorConfiguration()
      • newValidatorConfiguration

        protected org.hibernate.validator.HibernateValidatorConfiguration newValidatorConfiguration()
        Creates a new HibernateValidatorConfiguration with all the custom ValueExtractor registered.