没有配置应用程序加载器 [英] No application loader is configured
问题描述
我正在按照尽管我的图书馆中有果汁,但出现以下错误:
And I get the following error, although I have juice included in my library:
libraryDependencies += guice
我对此有适当的帮助.
java.lang.RuntimeException: No application loader is configured. Please configure an application loader either using the play.application.loader configuration property, or by depending on a module that configures one. You can add the Guice support module by adding "libraryDependencies += guice" to your build.sbt.
at scala.sys.package$.error(package.scala:27)
推荐答案
我遇到了同样的问题.我创建了一个多模块项目,并决定尝试将guice库用于单个模块,因为它是唯一带有play框架的模块.其他模块只是普通的Java项目. 我放
I had the same problem. I created a multimodule project and at some point decided to try to use guice library for a single module as it was the only module with play framework. Other modules are just plain Java projects. I put
libraryDependencies += guice
该模块.然后问题出现了.即使当我把guice移回去也没有帮助.奇怪的是,如果我使用的话,恢复项目后就可以开始工作
to that module. Then the problem appeared. Even when I moved guice back it didn't help. The strange thing is that after I reverted project started to work if I use
$sbt run
但是在Intellij Idea中不起作用. 要解决该问题,我必须在我的IDE中重新导入该项目.
but it doesnt work in Intellij Idea. To resolve it I had to reimport the project in my IDE.
这篇关于没有配置应用程序加载器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!