带有Play的ReactiveMongo:特性MongoController中的方法gridFSBodyParser已被弃用:将`gridFSBodyParser`与`Future [GridFS]一起使用

时间:2016-06-06 00:27:09

标签: scala reactivemongo playframework-2.5

我在PlayFramework的控制器中有以下代码:

method gridFSBodyParser in trait MongoController is deprecated: Use gridFSBodyParser with Future[GridFS]

它给了我以下错误:

private val gridFS = reactiveMongoApi.gridFS

我尝试将导入private val gridFS = reactiveMongoApi.asyncGridFS更改为[error] found : scala.concurrent.Future[reactivemongo.api.gridfs.GridFS[reactivemongo.play.json.JSONSerializationPack.type]] [error] required: reactivemongo.api.gridfs.GridFS[reactivemongo.play.json.JSONSerializationPack.type] ,但后来收到如下错误:

public override bool FinishedLaunching(UIApplication application, NSDictionary options)
        {
            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var pushSettings =
                    UIUserNotificationSettings.GetSettingsForTypes(
                        UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound,
                        new NSSet());

                UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings);
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
            }
            else
            {
                var notificationType = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge
                                       | UIRemoteNotificationType.Sound;
                UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationType);
            }
            if (options != null && options.ContainsKey(UIApplication.LaunchOptionsRemoteNotificationKey))
            {
                var userInfo = options[UIApplication.LaunchOptionsRemoteNotificationKey] as NSDictionary;
                if (userInfo != null)
                {
                    var response = this.ParseResponse(userInfo);
                    this.ShowNotifications(response, true);
                }
                else
                {
                    this.Refresh();
                }
            }
            else
            {
                this.Refresh();
            }

            return ApplicationDelegate.SharedInstance.FinishedLaunching(application, options);
        }

我错过了什么?

提前致谢!

0 个答案:

没有答案