2013-07-15 34 views
0

我有一個Play(2.1.2)項目,其中包含一個子模塊「經理」。是否有可能在主項目中使用模板中使用的子項目?

我想從位於主項目中的模板中的子模塊使用路由器。

我試圖論文:

@controllers.manager.routes.MyController.method 
@controllers.routes.MyController.method 
@controllers.routes.manager.MyController.method 

毫無效果。

有關信息,我也跟着地處Play documentation教程:

我有這樣的項目結構:

app 
    └ controllers 
    └ models 
    └ views 
conf 
    └ application.conf 
    └ routes 
modules 
    └ manager 
    └ conf/manager.routes 
    └ app/controllers 
    └ app/models 
    └ app/views  
project 
└ build.properties 
└ Build.scala 
└ plugins.sbt 

而且在主要航線有:

-> /admin manager.Routes 

只有我做的事,是把我的路線在沒有子包「manager」(controllers.manager)的manager.routes中,我直接將它們命名爲主項目(控制器),f或this problem with eclipse。我的子項目中的控制器中的「包」名稱也是如此。

是否可以在主項目中使用子項目的路徑?

感謝您的幫助!

回答

0

是的它應該是這樣的:

@admin.routes.Application.index 

@module.routes.MyController.method 
相關問題