我正在爲播放子項目功能進行更多擴展測試,如此處所述:http://www.playframework.com/documentation/2.0/SBTSubProjects。但我得到的錯誤:資產已被定義爲對象資產
Assets is already defined as object Assets
託管在GitHub上的示例應用程序:https://github.com/adis-me/PlayStrap
這裏描述我已經定義了一個資產控制器我子項目:Asset Controller description,甚至爲主營項目,但錯誤不斷彈出。我的項目出了什麼問題?
控制器
package com.company.playstrap.controllers;
import controllers.AssetsBuilder;
public class Assets {
public static controllers.AssetsBuilder delegate = new AssetsBuilder();
}
routes文件
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / com.company.playstrap.controllers.Application.index()
# Include sub projects
-> /common common.Routes
-> /admin admin.Routes
-> /website website.Routes
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file com.company.playstrap.controllers.Assets.delegates.at(path="/public", file)
這意味着所有(反轉路由東西)在視圖中需要寫入如:'@ routes.Assets.asset(「someAss」)'?這個錯誤是否已修正,我找不到這個問題的任何錯誤報告... – adis