Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Playframework 自我类型不符合Play2ReactiveMono的错误_Playframework_Reactivemongo - Fatal编程技术网

Playframework 自我类型不符合Play2ReactiveMono的错误

Playframework 自我类型不符合Play2ReactiveMono的错误,playframework,reactivemongo,Playframework,Reactivemongo,将play2reactivemongo升级到0.11.0.play24后,我遇到以下错误。代码在升级之前编译良好 代码: 错误消息: self-type controllers.TestController.type does not conform to play.modules.reactivemongo.MongoController's selftype play.modules.reactivemongo.MongoController with play.api.mvc.Contro

将play2reactivemongo升级到0.11.0.play24后,我遇到以下错误。代码在升级之前编译良好

代码:

错误消息:

self-type controllers.TestController.type does not conform to play.modules.reactivemongo.MongoController's selftype play.modules.reactivemongo.MongoController with play.api.mvc.Controller with play.modules.reactivemongo.ReactiveMongoComponents

一旦Play 2.4引入了新的依赖项注入,您的Mongo控制器就必须
使用ReactiveMongoComponents
(Play.modules.reactivemongo.ReactiveMongoComponents)扩展MongoController

新特性表明,在编译时必须为控制器提供一个
reactiveMongoApi:reactiveMongoApi
(play.modules.reactivemongo.reactiveMongoApi)

然后,如果要自动注入此
reactiveMongoApi
,则必须按照中指示的步骤进行操作

self-type controllers.TestController.type does not conform to play.modules.reactivemongo.MongoController's selftype play.modules.reactivemongo.MongoController with play.api.mvc.Controller with play.modules.reactivemongo.ReactiveMongoComponents