无法为 Play Framework 1.2.2 配置 crudsiena 模块
我正在尝试在 Play Framework(1.2.2) + siena (2.0.2) + crudsiena(2.0.1) + gae(1.4) 上创建基本应用程序。所有这些都是我从 Play 的依赖管理系统中获得的。 我正在遵循文档中的示例,但出现了一个奇怪的错误:
未找到 els.list 操作未找到
,并且稍后在注册的路由中具有相同的“吃掉”类名称:
获取 /admin/? els.index
获取 /admin/mymodels els.list
获取/admin/mymodels/new els.blank
获取 /admin/mymodels/{id} els.show
堆栈跟踪非常直接:
play.exceptions.ActionNotFoundException: Action els.index not found
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:585)
at play.mvc.ActionInvoker.resolve(ActionInvoker.java:84)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.els not found
... 3 more
我的文件看起来像:
app/models/ MyModels.java:
package models;
import controllers.CRUD;
import controllers.CRUD.For;
@For(models.MyModel.class)
public class MyModels extends CRUD {
}
app/models/MyModel.java:
package models;
import java.util.Date;
import siena.Id;
import siena.Model;
public class MyModel extends Model {
@Id
Long id;
String name;
String description;
Integer price;
Boolean avaliable;
Date menuItemCreated;
}
+ 路由设置为 /admin module:crudsiena + dependency.yml 添加了有关 gae、siena 和 crudsiena 的行,
其他文件保持不变。
有人知道我做错了什么吗?
谢谢指教。
i'm trying to create basic application on Play Frramework(1.2.2) + siena (2.0.2) + crudsiena(2.0.1) + gae(1.4). all of these i got from play's dependency management system.
I was follwing sample in documentation and i got an strange error:
Not found els.list action not found
and than same "eaten" class names later in routes that was registered:
GET /admin/? els.index
GET /admin/mymodels els.list
GET /admin/mymodels/new els.blank
GET /admin/mymodels/{id} els.show
Stack trace is very strait forward to:
play.exceptions.ActionNotFoundException: Action els.index not found
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:585)
at play.mvc.ActionInvoker.resolve(ActionInvoker.java:84)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.els not found
... 3 more
my files look like:
app/models/MyModels.java:
package models;
import controllers.CRUD;
import controllers.CRUD.For;
@For(models.MyModel.class)
public class MyModels extends CRUD {
}
app/models/MyModel.java:
package models;
import java.util.Date;
import siena.Id;
import siena.Model;
public class MyModel extends Model {
@Id
Long id;
String name;
String description;
Integer price;
Boolean avaliable;
Date menuItemCreated;
}
+ route set to /admin module:crudsiena
+ dependencies.yml added lines about gae, siena and crudsiena
other files are left unchanged.
Does anybody know what i'm doing wrong ?
Thanks in advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么你的控制器在封装型号中?它不应该在包控制器中吗?
Why does your controller is in the package models? shouldn't it be in package controllers?