开发者

cannot include roots in play framework

I have created a module called design inside /var/www/html/play-1.2.2/modules/design I have my play application in /var/www/html/MyPlayApp

In MyPlayApp dependencies.yml i have given

require:
    - play
    - play -> design

In开发者_运维技巧 MyPlayApp routes i have given

GET     /design                                 module:design.index

I have created index page inside the design module

In Design.java in controllers

package controllers;

import models.*;
import javax.persistence.*;
import play.mvc.Controller;
import java.util.*;
import play.data.validation.Required;
import play.db.jpa.*;

public class Design extends Controller {

    public static void index() {
        render();
    }
}

Inside design controllers dependencies.yml

self: play -> design 0.1
require:
    - play

Inside design module routes

GET     /                                       Design.index

When i run the application and enter into the browser it says

10:03:41,114 ERROR ~ Cannot include routes for module design.index 

Please help out of this........


Try this in your app route:

GET     /design                                 module:design

and this in your module route:

GET     /?                                       Design.index

this should redirect /design to your module and in the module, by default, everything will go to index.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜