我正在尝试使用 mongo-template 运行 js 文件。 在此处查看 StackOverFlow 线程
我正在尝试使用相同的代码库,根本没有改变。这对我不起作用。我在这一行得到异常:
scriptOps.register(new NamedMongoScript("echo", echoScript));
错误:
org.springframework.core.convert.ConverterNotFoundException:找不到能够从类型 [org.springframework.data.mongodb.core.script.NamedMongoScript] 转换为类型 [com.mongodb.DBObject] 的转换器
完成 StackTrace ...
org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313) 在 org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195) 在 org.springframework.core.convert。 support.GenericConversionService.convert(GenericConversionService.java:176) 在 org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:375) 在