/ / Integrando o Apache Shiro no framework Play 2.1 - apache, frameworks, playframework-2.1, shiro

Integrando o Apache Shiro no framework Play 2.1 - apache, frameworks, playframework-2.1, shiro

Estou tentando integrar o Apache Shiro no Play framework 2.1 Eu estou usando um projeto de código aberto (https://github.com/wsargent/play-shiro) que apóia jogo estrutura 2.0

Eu tentei migrar este aplicativo do jogo 2.0 para 2.1, mas eu continuo recebendo esses erros quando eu compilar o projeto ...

Alguém sabe como lidar com esses erros?

[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] $

Respostas:

3 para resposta № 1

Eu atualizei o código para o 2.1, mas, por favor, considere o uso do Play Authenticate ou do SecureSocial. Esse código nunca foi destinado a ser de qualidade de produção.


0 para resposta № 2

Após a atualização do Play! 2.0 para jogar! 2.1, você executou os seguintes comandos?

play clean
play clean-files
play compile

Isso geralmente é a causa desses problemas de compilação.

Se o problema persistir, dê uma olhada no guia de migração para verificar se você realmente seguiu todas as etapas necessárias.