开发者

Cannot configure crudsiena module for play framework 1.2.2

开发者 https://www.devze.com 2023-03-21 00:02 出处:网络
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'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 开发者_StackOverflow中文版 /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.


Why does your controller is in the package models? shouldn't it be in package controllers?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号