No converter found capable of converting from type java.lang.String to type @org.springframework.data.repository.query.Param

前端 未结 2 1127
庸人自扰
庸人自扰 2021-01-07 13:06

I\'m building a MongoDb rest application with spring boot 1.1.5. I have created a repository:

@RepositoryRestResource(collectionResourceRel = \"SourceProduct         


        
2条回答
  •  庸人自扰
    2021-01-07 13:34

    After many try, i've found this solution

        @PostConstruct
    public void init(){
        GenericConversionService conversionService = (GenericConversionService) DefaultConversionService.getSharedInstance();
        conversionService.addConverter(new JPAConverter());
    }
    

    Converter and GenericConvert are supported.

提交回复
热议问题