我正在对 Play Subproject 功能进行更多扩展测试,如下所述:http ://www.playframework.com/documentation/2.0/SBTSubProjects 。但我收到错误:
Assets is already defined as object Assets
托管在 github 上的示例应用程序:https ://github.com/adis-me/PlayStrap
我已经为我的子项目定义了一个资产控制器,如下所述:资产控制器描述,即使是主项目,但错误不断弹出。我的项目有什么问题?
控制器
package com.company.playstrap.controllers;
import controllers.AssetsBuilder;
public class Assets {
public static controllers.AssetsBuilder delegate = new AssetsBuilder();
}
路由文件
# 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)