本文介绍了Play Framework 2.2(scala)play.api.cache不包括在标准配置中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用play 2.2(scala).由于找不到,我无法导入play.api.cache._.我认为它不包含在标准下载中吗?我如何启用/获取它.我需要手动将其包含在SBT构建配置文件中吗?

I am using play 2.2 (scala). I can not import play.api.cache._ as it is not found. I assume that it is not included as part of the standard download? How can I enable/get it. Do I need to included it manually in SBT build profile?

奇怪的是,诸如缓存之类的重要组件未作为标准组件包括在内.

Strange that an important component like caching is not included as standard.

谢谢

推荐答案

是正确的.根据迁移指南:

Play cache is now split out into its own module. If you are using the Play cache, you will need to add this as a dependency. For example, in Build.scala:

val addDependencies = Seq(
   jdbc,
  cache,
  ...
)

或者,如果您使用的是build.sbt,则可以在其中添加它.对于新的2.2.x项目,cache似乎会自动包含在生成的build.sbt中.

Or if you're using build.sbt, you can add it there. cache seems to be included automatically in the generated build.sbt for new 2.2.x projects.

这篇关于Play Framework 2.2(scala)play.api.cache不包括在标准配置中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 03:55
查看更多