Package org.springframework.format.support

Examples of org.springframework.format.support.DefaultFormattingConversionService


    source.put("key", null);

    TestMapConsumer target = new TestMapConsumer();

    WebDataBinder dataBinder = new WebDataBinder(target, "");
    dataBinder.setConversionService(new DefaultFormattingConversionService());
   
    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.addPropertyValue("testMap", source);
    dataBinder.bind(pvs);
View Full Code Here


    source.put(new Integer(5), new Integer(6));

    TestMapConsumer target = new TestMapConsumer();

    WebDataBinder dataBinder = new WebDataBinder(target, "");
    dataBinder.setConversionService(new DefaultFormattingConversionService());
   
    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.addPropertyValue("testNumberMap", source);
    dataBinder.bind(pvs);
View Full Code Here

    source.put(new Integer(5), new Integer(6));

    TestMapConsumer target = new TestMapConsumer();

    WebDataBinder dataBinder = new WebDataBinder(target, "");
    dataBinder.setConversionService(new DefaultFormattingConversionService());
   
    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.addPropertyValue("testIntegerMap", source);
    dataBinder.bind(pvs);
View Full Code Here

    source.put(new TestBean(), new TestBean());

    TestMapConsumer target = new TestMapConsumer();

    WebDataBinder dataBinder = new WebDataBinder(target, "");
    dataBinder.setConversionService(new DefaultFormattingConversionService());
   
    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.addPropertyValue("testBeanMap", source);
    dataBinder.bind(pvs);
View Full Code Here

        try {
            oldConversionService = SearchableConvertUtils.getConversionService();
        } catch (Exception e) {
            //ignore null case
        }
        SearchableConvertUtils.setConversionService(new DefaultFormattingConversionService());
    }
View Full Code Here

    return config;
  }

  @Bean
  public DefaultFormattingConversionService defaultConversionService() {
    return new DefaultFormattingConversionService();
  }
View Full Code Here

    return config;
  }

  @Bean
  public DefaultFormattingConversionService defaultConversionService() {
    return new DefaultFormattingConversionService();
  }
View Full Code Here

  @Bean
  @Qualifier
  public DefaultFormattingConversionService defaultConversionService() {

    DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
    conversionService.addConverter(UUIDConverter.INSTANCE);
    configureConversionService(conversionService);

    if (!conversionService.canConvert(String.class, Point.class)) {
      conversionService.addConverter(StringToPointConverter.INSTANCE);
    }

    if (!conversionService.canConvert(String.class, Distance.class)) {
      conversionService.addConverter(StringToDistanceConverter.INSTANCE);
    }

    return conversionService;
  }
View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private RepositoryInvoker getInvokerFor(Object repository, Class<?> expectedType) {

    Object proxy = getVerifyingProxy(repository, expectedType);
    Repositories repositories = new Repositories(context);
    ConversionService conversionService = new DefaultFormattingConversionService();

    return new CrudRepositoryInvoker((CrudRepository) proxy, repositories.getRepositoryInformationFor(Order.class),
        conversionService);
  }
View Full Code Here

   * @param contributors a collection of {@link UriComponentsContributor}
   * or {@link HandlerMethodArgumentResolver}s.
   */
  public CompositeUriComponentsContributor(UriComponentsContributor... contributors) {
    Collections.addAll(this.contributors, contributors);
    this.conversionService = new DefaultFormattingConversionService();
  }
View Full Code Here

TOP

Related Classes of org.springframework.format.support.DefaultFormattingConversionService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.