Scala播放-“未找到:价值路线"; (Eclipse和IDEA)
有时,而且似乎无缘无故,在其中一个视图模板(编译后)中出现未找到:值路由"编译错误. 在Eclipse或IDEA中都会发生这种情况.
Occasionally, and seemingly for no reason, I get "not found: value routes" compilation error in one of the view templates (after compilation). This happens either in Eclipse or IDEA.
Google搜索找到此,但是无法在播放2.10中添加mainLang = SCALA(I我正在使用2.1.2版).
Googling finds this but it's not possible to add mainLang = SCALA in play 2.10 (I'm using version 2.1.2).
清理项目/重新隐藏项目/有时似乎可行,但是还有其他更持久的解决方案/解决方法吗?
Cleaning the project / re-eclipsifying it / seems to work, sometimes, but is there any more permenant solution / work-around?
谢谢
由于似乎没有答案,因此我将至少描述我的解决方法: 而不是使用
Since there seems to be no answer, I'll at-least describe my workaround: Instead of using
<link href=@routes.Assets.at("stylesheets/style.css") rel="stylesheet" type="text/css" />
我正在使用模板HTML,
in my template HTML, I'm using
<link href="assets/stylesheets/styles.css") rel="stylesheet" type="text/css" />
因为我没有调用route.Assets.at,所以没有找到值路由没有问题. (但是,我猜测当我需要更复杂的模板时,这种解决方法很容易崩溃)
Since I'm not invoking routes.Assets.at, there is no issue with not finding the value routes. (However, I'm guessing this workaround will easily crumble when I would have need of more complex templates)