Package org.springframework.format.support

Examples of org.springframework.format.support.DefaultFormattingConversionService


  private static RepositoryInvoker getInvokerFor(Object repository, VerifyingMethodInterceptor interceptor) {

    Object proxy = getVerifyingRepositoryProxy(repository, interceptor);

    RepositoryMetadata metadata = new DefaultRepositoryMetadata(repository.getClass().getInterfaces()[0]);
    GenericConversionService conversionService = new DefaultFormattingConversionService();

    return new CrudRepositoryInvoker((CrudRepository) proxy, metadata, conversionService);
  }
View Full Code Here


    /**
     * Creates a new {@link DateConvertingAuditableBeanWrapper}.
     */
    public DateConvertingAuditableBeanWrapper() {

      DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();

      if (IS_JODA_TIME_PRESENT) {
        conversionService.addConverter(CalendarToDateTimeConverter.INSTANCE);
        conversionService.addConverter(CalendarToLocalDateTimeConverter.INSTANCE);
      }

      this.conversionService = conversionService;
    }
View Full Code Here

   * Creates a new {@link DefaultRepositoryInvokerFactory} for the given {@link Repositories}.
   *
   * @param repositories must not be {@literal null}.
   */
  public DefaultRepositoryInvokerFactory(Repositories repositories) {
    this(repositories, new DefaultFormattingConversionService());
  }
View Full Code Here

  @SuppressWarnings({ "unchecked", "rawtypes" })
  private static RepositoryInvoker getInvokerFor(Object repository) {

    RepositoryMetadata metadata = new DefaultRepositoryMetadata(repository.getClass().getInterfaces()[0]);
    GenericConversionService conversionService = new DefaultFormattingConversionService();

    return new PagingAndSortingRepositoryInvoker((PagingAndSortingRepository) repository, metadata, conversionService);
  }
View Full Code Here

  ConversionService conversionService;

  @Before
  public void setUp() {
    this.conversionService = new DefaultFormattingConversionService();
  }
View Full Code Here

  }

  private static RepositoryInvoker getInvokerFor(Object repository) {

    RepositoryMetadata metadata = new DefaultRepositoryMetadata(repository.getClass().getInterfaces()[0]);
    GenericConversionService conversionService = new DefaultFormattingConversionService();

    return new ReflectionRepositoryInvoker(repository, metadata, conversionService);
  }
View Full Code Here

   * controller methods and the {@code spring:eval} JSP tag.
   * Also see {@link #addFormatters} as an alternative to overriding this method.
   */
  @Bean
  public FormattingConversionService mvcConversionService() {
    FormattingConversionService conversionService = new DefaultFormattingConversionService();
    addFormatters(conversionService);
    return conversionService;
  }
View Full Code Here

   * controller methods and the {@code spring:eval} JSP tag.
   * Also see {@link #addFormatters} as an alternative to overriding this method.
   */
  @Bean
  public FormattingConversionService mvcConversionService() {
    FormattingConversionService conversionService = new DefaultFormattingConversionService();
    addFormatters(conversionService);
    return conversionService;
  }
View Full Code Here

    return new ObjectMapper();
  }

  @Override
  public ConversionService conversionService() {
    return new DefaultFormattingConversionService();
  }
View Full Code Here

public class TestBeanWrapper {

  @Test
  public void testBeanWrapper() {
    BeanWrapper memberWrapped = new BeanWrapperImpl(new Member());
    ConversionService conversionService = new DefaultFormattingConversionService();
    memberWrapped.setConversionService(conversionService );
    memberWrapped.setAutoGrowNestedPaths(true);
    PropertyValue pv1 = new PropertyValue("first", "john");
    PropertyValue pv2 = new PropertyValue("last", "doe");
   
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.