gpt4 book ai didi

Scala play - "not found: value routes"(Eclipse 和 IDEA)

转载 作者:行者123 更新时间:2023-12-04 03:58:32 24 4
gpt4 key购买 nike

有时,似乎无缘无故,我在其中一个 View 模板(编译后)中收到“未找到:值路由”编译错误。
这发生在 Eclipse 或 IDEA 中。

谷歌搜索 this但不可能在 play 2.10 中添加 mainLang = SCALA(我使用的是 2.1.2 版)。

清理项目/重新遮蔽它/有时似乎有效,但有没有更多的永久解决方案/变通方法?

谢谢

最佳答案

由于似乎没有答案,我至少会描述我的解决方法:
而不是使用

<link href=@routes.Assets.at("stylesheets/style.css") rel="stylesheet" type="text/css" />

在我的模板 HTML 中,我正在使用
<link href="assets/stylesheets/styles.css") rel="stylesheet" type="text/css" />

因为我没有调用 routes.Assets.at,所以没有找到值路由没有问题。
(但是,我猜当我需要更复杂的模板时,这种解决方法很容易崩溃)

关于Scala play - "not found: value routes"(Eclipse 和 IDEA),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18196123/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com