• MongoDB Error


    ①,org.springframework.core.convert.ConverterNotFoundException: No converter found capable of     converting from type org.joda.time.LocalDate to type java.lang.String
    at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:475)
    at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175)

    at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154)

    解决方案:converter.afterPropertiesSet();

    MappingMongoConverter converter = new MappingMongoConverter(mongoDbFactory, context);
    converter.setTypeMapper(mapper);
    converter.setCustomConversions(new CustomConversions(Arrays.asList(new TimeZoneReadConverter(),new TimeZoneWriteConverter())));
    converter.afterPropertiesSet();
    MongoTemplate template = new MongoTemplate(mongoDbFactory, converter);

  • 相关阅读:
    通信信号处理的一些基本常识
    欧拉公式
    css3圆角讲解
    css3投影讲解、投影
    css3变形讲解
    浏览器兼容问题
    css3渐变详解
    css中em与px
    복 경 에 갑 니 다 去北京
    我在北京:)
  • 原文地址:https://www.cnblogs.com/riskyer/p/3249384.html
Copyright © 2020-2023  润新知