Package io.dropwizard.vavr
Class VavrBundle<T extends io.dropwizard.core.Configuration>
java.lang.Object
io.dropwizard.vavr.VavrBundle<T>
- 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 Summary
ConstructorsConstructorDescriptionAdd Vavr support (Jackson, Jersey) to Dropwizard.VavrBundle(boolean registerMessageBodyWriters) Add Vavr support (Jackson, Jersey) to Dropwizard.VavrBundle(io.vavr.jackson.datatype.VavrModule.Settings settings, boolean registerMessageBodyWriters) Add Vavr support (Jackson, Jersey) to Dropwizard. -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap) protected org.hibernate.validator.HibernateValidatorConfigurationCreates a newHibernateValidatorConfigurationwith all the customValueExtractorregistered.protected jakarta.validation.ValidatorFactoryCreates a newValidatorFactorybased onnewValidatorConfiguration()void
-
Constructor Details
-
VavrBundle
public VavrBundle()Add Vavr support (Jackson, Jersey) to Dropwizard. -
VavrBundle
public VavrBundle(boolean registerMessageBodyWriters) Add Vavr support (Jackson, Jersey) to Dropwizard.- Parameters:
registerMessageBodyWriters- RegisterEitherMessageBodyWriterandValueMessageBodyWriterinObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such asEither,Option, andLazywith 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 JacksonVavrModuleregisterMessageBodyWriters- RegisterEitherMessageBodyWriterandValueMessageBodyWriterinObjectMapper. NOTE: This will make it impossible to serialize or deserialize classes such asEither,Option, andLazywith Jackson. Use with care!
-
-
Method Details
-
initialize
public void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap) - Specified by:
initializein interfaceio.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
-
run
- Specified by:
runin interfaceio.dropwizard.core.ConfiguredBundle<T extends io.dropwizard.core.Configuration>
-
newValidatorFactory
protected jakarta.validation.ValidatorFactory newValidatorFactory()Creates a newValidatorFactorybased onnewValidatorConfiguration() -
newValidatorConfiguration
protected org.hibernate.validator.HibernateValidatorConfiguration newValidatorConfiguration()Creates a newHibernateValidatorConfigurationwith all the customValueExtractorregistered.
-