Scala播放-“未找到:价值路线"; (Eclipse和IDEA) [英] Scala play - "not found: value routes" (Eclipse and IDEA)

查看:73
本文介绍了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)

这篇关于Scala播放-“未找到:价值路线"; (Eclipse和IDEA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆