PlayFramework 2.1,子模块和Eclipse有关于无效包名称的错误 [英] PlayFramework 2.1, submodules and Eclipse having errors about invalid package name
问题描述
声明的包controllers.website 不符合预期的包控制器
当然,因为在我的模块中,我在 modules / {submodule_name} / app / controllers /
,例如: modules / website / app / controllers /
但是根据Play文档中的定义,控制器必须具有包名controllers. {submodule_name}(controllers.website)。
这导致了每个控制器的Eclipse中的错误。
如何在Eclipse中修复它?是否可以重命名文件夹?或者告诉Eclipse它是没关系的在这种情况下?
我已经重命名了我的控制器包,只是重命名它,在路由中重命名并运行以下命令:
播放清洁
和
播放编译
和
play eclipse
阅读更多有关此主题的信息: Play Framework:如何更改播放默认包?
Using PlayFramework 2.1 and submodules, I have an error with all my controllers in Eclipse :
"The declared package "controllers.website" does not match the expected package "controllers"
Of course, because in my module, I added controllers in modules/{submodule_name}/app/controllers/
, eg: modules/website/app/controllers/
But as defined in the documentation of Play, controllers must have the package name "controllers.{submodule_name}" ("controllers.website").
And this results in an error in Eclipse for each controllers.
How can I fix that in Eclipse? Is it possible to rename the folder? or tell Eclipse it's okay in that case?
I have renamed my controller package too, just rename it, rename it in routes and run the following commands:
play clean
and
play compile
and
play eclipse
Read more about this topic: Play Framework: How to change play default packages?
这篇关于PlayFramework 2.1,子模块和Eclipse有关于无效包名称的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!