问题描述
-
如此处所述>如果我将解析器放在
plugins.sbt
中,则播放看不到它们.但是,如果我将它们移动到build.sbt
中,它将起作用.有原因吗?
As stated here if I put the resolvers in
plugins.sbt
Play doesn't see them. But it works if I move them inbuild.sbt
. Is there a reason?
另一个问题:如果没有文件play.plugins
,我会收到此错误:"**Exception:** The Deadbolt Java plugin was not registered, or is disabled. Please check your conf/play.plugins file."
,但是在任何安装指南中都没有写明需要安装play.plugins
来安装Deadbolt(对于较旧的版本可能是必需的). 源1 源2
Another problem: if there isn't the file play.plugins
I get this error:"**Exception:** The Deadbolt Java plugin was not registered, or is disabled. Please check your conf/play.plugins file."
But it isn't written in any installation guide that play.plugins
is needed to install Deadbolt (maybe it was needed for older version). source 1 source 2
总而言之,我认为Deadbolt安装存在很大的困惑.有人可以澄清吗?
In conclusion, I think there's a big confusion about Deadbolt installation. Someone could clarify?
推荐答案
-
plugins.sbt用于构建工具sbt的插件,例如,您可以放置一个发布插件,或者在其中放置几行代码插件,build.sbt用于您的实际项目,因此您想在项目内部使用的
plugins.sbt is for plugins to sbt, the build tool, so for example you would put a release plugin, or maybe a count lines of code-plugin there, build.sbt is for your actual project so stuff you want to use inside your project goes there
要播放以加载您在类路径中可用的插件(通过将它们放在lib/目录中或通过在build.sbt中添加托管依赖项),必须始终将它们添加到conf/play中.plugins. deadbolt-2文档中已注明您需要执行的操作,但文档的第一页中并未注明: https://github.com/schaloner/deadbolt-2-guide/blob/master/04-deadbolt-java-hooks.markdown
for play to load plugins that you have made available on the classpath (either by putting them in the lib/ directory or by adding a managed dependency in you build.sbt) you must always add them to conf/play.plugins. That you need to do that is noted in the deadbolt-2 docs, altough not on the first page of the docs: https://github.com/schaloner/deadbolt-2-guide/blob/master/04-deadbolt-java-hooks.markdown
这篇关于有关在Play 2.2.1上安装Deadbolt的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!