2013-04-11 3 views
1

Я пытаюсь создать подпроект администратора с игровой платформой. В вызове администратора http://localhost:9000/admin/index Я не могу добраться до просмотров администратора, есть проблема с активами. Не могу понять, что случилось:Маршрутизация активов в подпроектах

val appDependencies = Seq(
// Add your project dependencies here, 
javaCore, 
javaJdbc, 
javaEbean) 

    // admin module 
    val admin = play.Project(appName + "-admin", appVersion, appDependencies, path = file("modules/admin")) 

    val main = play.Project(appName, appVersion, appDependencies, path = file(".")).settings( 
    // Add your own project settings here  
).dependsOn(admin).aggregate(admin) 

Структура проекта выглядит следующим образом:

. 
|-app 
|---controllers 
|---views 
|-conf 
|-logs 
|-modules 
|---admin 
|-----app 
|-------controllers 
|---------admin 
|-------views 
|---------admin 
|-----conf 
|-----public 
|-----test 
|-project 
|-public 
|---images 
|---javascripts 
|---stylesheets 
|-test 

Conf/маршруты

GET /       controllers.Application.index() 

    -> /admin admin.Routes 

    # Map static resources from the /public folder to the /assets URL path 
    GET  /assets/*file    controllers.Assets.at(path="/public", file) 

/modules/admin/conf/admin.routes

GET  /index       controllers.admin.Application.index() 

    # Map static resources from the /public folder to the /assets URL path 
    #GET  /assets/*file    controllers.admin.Assets.at(path="/public", file) 
    GET  /assets/*file    controllers.Assets.at(path="/public", file) 

Здесь, в admin.routes это не сработает: GET /assets/*file controllers.admin.Assets.at(path="/public", file)

ответ

0

На самом деле GET /assets/*file controllers.admin.Assets.at(path="/public", file) в администратор не нужен ни /assets/*file controllers.Assets.at(path="/public", file) в администраторе.

Но мнения нужно называть разными. например viewadmin (views/admin/не работает)

Смежные вопросы