在Play framework 2.1上集成ApacheShiro

在Play framework 2.1上集成ApacheShiro,apache,frameworks,playframework-2.1,shiro,Apache,Frameworks,Playframework 2.1,Shiro,我正在尝试将ApacheShiro集成到Play framework 2.1中 我正在使用一个支持PlayFramework2.0的开源项目() 我曾尝试将此应用程序从Play2.0迁移到2.1,但在编译项目时不断出现这些错误 有人知道如何处理这些错误吗 [play-shiro] $ compile [info] Updating {file:/Users/shai/Documents/Projects/opensource/play-shiro/}play-shiro... [info] Do

我正在尝试将ApacheShiro集成到Play framework 2.1中 我正在使用一个支持PlayFramework2.0的开源项目()

我曾尝试将此应用程序从Play2.0迁移到2.1,但在编译项目时不断出现这些错误

有人知道如何处理这些错误吗

[play-shiro] $ compile
[info] Updating {file:/Users/shai/Documents/Projects/opensource/play-shiro/}play-shiro...
[info] Done updating.                                                        
[info] Compiling 13 Scala sources and 1 Java source to /Users/shai/Documents/Projects/opensource/play-shiro/target/scala-2.10/classes...
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:0: not found: type Flash
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:1: not found: type Flash
[error] @(form: Form[(String,String)])(implicit flash: Flash)
[error]                                               ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Login.scala:36: type mismatch;
[error]  found   : play.api.data.Form[(String, String)]
[error]  required: play.data.Form[(String, String)]
[error]     Ok(html.login(loginForm))
[error]                   ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Login.scala:44: type mismatch;
[error]  found   : play.api.data.Form[(String, String)]
[error]  required: play.data.Form[(String, String)]
[error]       formWithErrors => { BadRequest(html.login(formWithErrors)) },
[error]                                                 ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:0: not found: type Flash
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:1: not found: type Flash
[error] @(form: Form[(String,String)])(implicit flash: Flash)
[error]                                               ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Register.scala:30: type mismatch;
[error]  found   : play.api.data.Form[(String, String)]
[error]  required: play.data.Form[(String, String)]
[error]     Ok(html.register(registerForm))
[error]                      ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Register.scala:37: type mismatch;
[error]  found   : play.api.data.Form[(String, String)]
[error]  required: play.data.Form[(String, String)]
[error]           BadRequest(html.login(formWithErrors))
[error]                                 ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:19: value map is not a member of play.data.validation.ValidationError
[error]             @form.globalError.map { error =>
[error]                               ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:53: not found: type Flash
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:55: not found: type Flash
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:18: value map is not a member of play.data.validation.ValidationError
[error]   @form.globalError.map { error =>
[error]                     ^
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:51: not found: type Flash
[error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:53: not found: type Flash
[error] 14 errors found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed Apr 17, 2013 7:00:42 PM
[play-shiro] $ 

从游戏升级后!2.0游戏!2.1,是否运行了以下命令

play clean
play clean-files
play compile
这通常是这些编译问题的原因


如果问题仍然存在,请查看以检查您是否确实遵循了所有必需的步骤

>我已将代码升级到2.1,但请考虑使用播放认证或SeCuSoCeCo。此代码从未打算用于生产质量。

我使用您的项目作为与Shiro的Play集成的基础(用于生产,是的:),并感谢您开放了它。如果有什么值得的,我会提交一个请求。Shiro更适合我们的需要,因为它提供了细粒度的基于角色的管理,并且不依赖于框架,这对我们的设置很好。嘿@WillSargent你的评论仍然有效吗?我正在考虑使用shiro,并可能将我的工作建立在您的基础上,所以我想知道我是否应该,或者是否仍然使用其他LIB,如SecureSocial(这可能有些过分)。非挥发性物质。。。这是RTFM的;-)