@Override protected void configure() { bind(OptionsMethodProcessor.DefaultOptionsResponseGenerator.class) .to(OptionsResponseGenerator.class) .in(Singleton.class); bind(OptionsMethodProcessor.class) .to(ModelProcessor.class) .in(Singleton.class); bind(ParamConverters.TypeFromStringEnum.class) .to(ParamConverterProvider.class) .in(Singleton.class).ranked(10); bind(ParamConverters.DateProvider.class) .to(ParamConverterProvider.class) .in(Singleton.class).ranked(10); bind(ParamConverters.BooleanProvider.class) .to(ParamConverterProvider.class) .in(Singleton.class).ranked(10); }
/** * {@inheritDoc} */ @Override protected void configure() { bind(TemplateMethodInterceptor.class).to(WriterInterceptor.class).in(Singleton.class); //noinspection unchecked bind(ViewableMessageBodyWriter.class).to(MessageBodyWriter.class).in(Singleton.class); bind(TemplateModelProcessor.class).to(ModelProcessor.class).in(Singleton.class); bindAsContract(ResolvingViewableContext.class).in(Singleton.class); bind(ResolvingViewableContext.class).to(ViewableContext.class).in(Singleton.class).ranked(1); }