简体   繁体   English

使用Deadbolt将Play框架从2.1.x迁移到2.3.0

[英]Play Framework Migrate from 2.1.x to 2.3.0 with Deadbolt

I have a pretty simple application that I want to upgrade from 2.1.x to 2.3.0 with deadbolt. 我有一个非常简单的应用程序,我想使用Deadbolt从2.1.x升级到2.3.0。 While Deadbolt hasn't officially came out for 2.3.x, the versions for 2.2.x should be good enough (also, this error occurs on 2.2.x). 虽然Deadbolt尚未正式发布用于2.3.x,但2.2.x的版本应该足够好(而且,此错误发生在2.2.x上)。

I have a simple check in a template for if subject is present 我在模板中有一个简单的检查,是否存在主题

@subjectPresent() { <p>Hi</p> }

Yet I get a compiler error 但是我遇到了编译器错误

bad symbolic reference. A signature in subjectPresent.class refers to term templates in package play which is not available.
It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling subjectPresent.class.

Now, this would seemingly point to some sort of path issue, but I am just unsure of how to go about fixing it. 现在,这似乎指向某种路径问题,但是我不确定如何解决它。

My build.sbt has the proper resolvers 我的build.sbt有合适的解析器

resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
    resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.io/snapshots/"))(Resolver.ivyStylePatterns)

and declares the dependencies 并声明依赖

val appDependencies = Seq(
     // .....
  "be.objectify" %% "deadbolt-java" % "2.2.1-RC2"

)

Any suggestions? 有什么建议么?

I guess a showstopper issue for upgrading to Play 2.3.0 is currently this: https://github.com/schaloner/deadbolt-2/issues/47 . 我猜当前升级到Play 2.3.0的showstopper问题是: https : //github.com/schaloner/deadbolt-2/issues/47 At least in my case. 至少就我而言。 I'd first wait for it to be fixed and released before spending more time on upgrading. 我将首先等待它修复并发布,然后再花更多时间进行升级。

I recommend to properly complete the upgrade to Play 2.2.x for now, so that you know you're not attempting something that's not really possible right now. 我建议暂时正确完成对Play 2.2.x的升级,以使您知道自己现在没有尝试某些不可能的事情。 This upgrade was quite painful for our project and serves as a good checkpoint for you. 这次升级对我们的项目来说是很痛苦的,对您来说是一个很好的检查点。

EDIT: try now with this new version that was just released and should support Play! 编辑:现在尝试使用刚刚发布的新版本,该版本应支持Play! 2.3.0: 2.3.0:

"be.objectify" %% "deadbolt-java" % "2.3.0-RC1" “ be.objectify” %%“ deadbolt-java”%“ 2.3.0-RC1”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM