gpt4 book ai didi

playframework - Assets Controller 编译错误[值 Assets 不是对象 Controller 的成员. Assets ] Play 2.3.8

转载 作者:行者123 更新时间:2023-12-02 04:48:07 26 4
gpt4 key购买 nike

将 Play 框架项目从 2.2.4 迁移到 2.3.8 后遇到问题:

这是运行命令“activatorcompile”的错误输出:

[error] ...\workspace\testproject\conf\routes: value Asset is not a member of object controllers.Assets 
[error] bad symbolic reference to controllers.Assets.Asset encountered in class file 'JavascriptLitteral.class'.
[error] Cannot access type Asset in object controllers.Assets. The current classpath may be missing a definition for controllers.Assets.Asset, or JavascriptLitteral.class may have been compiled against a version that's incompatible with the one found on the current classpath.
[error] ...\workspace\testproject\conf\routes: value Asset is not a member of object controllers.Assets
[error] three errors found

我编写了自己的 Assets Controller ,它是我因子项目而创建的。该项目不再包含在内,因此controller.Assets 仍然包含在内。

路由路径是标准的:

GET  /assets/*file       controllers.Assets.at(path="public", file)

有没有可能,2.3.8 的 Activator 和 Play 2.2.4 编译内容/清理项目的方式不同?我尝试自动关闭 Eclipse 的构建,仍然没有区别:(。

有人知道这个问题会造成什么吗?我很高兴收到任何提示:D

最佳答案

我删除了另一个文件中的object Assets extends controllers.AssetsBuilder,它解决了问题。

关于playframework - Assets Controller 编译错误[值 Assets 不是对象 Controller 的成员. Assets ] Play 2.3.8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28579692/

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