播放更改默认包装系统
Play change default packaging system
我在玩2.5.2
我知道默认的打包系统确实期望这样的东西:
app/
controllers/
models/
views/
但我希望它是:
app/
foo/
controllers/
models/
views/
我怎样才能做到这一点?
那边:https://www.playframework.com/documentation/2.5.x/Anatomy
他们确实是这样说的:
Note that in Play, the controllers, models and views package name conventions are now just that and can be changed if needed (such as prefixing everything with com.yourcompany).
但这并没有告诉我怎么做。
谢谢
您可以将您的控制器、模型和视图放在所需的包中。无需额外配置。但是,在编写 routes
文件时,您必须在条目前加上包。所以不要写
/foo controllers.FooController.bar()
你必须写:
/foo foo.controller.FooController.bar()
我在玩2.5.2 我知道默认的打包系统确实期望这样的东西:
app/
controllers/
models/
views/
但我希望它是:
app/
foo/
controllers/
models/
views/
我怎样才能做到这一点? 那边:https://www.playframework.com/documentation/2.5.x/Anatomy 他们确实是这样说的:
Note that in Play, the controllers, models and views package name conventions are now just that and can be changed if needed (such as prefixing everything with com.yourcompany).
但这并没有告诉我怎么做。
谢谢
您可以将您的控制器、模型和视图放在所需的包中。无需额外配置。但是,在编写 routes
文件时,您必须在条目前加上包。所以不要写
/foo controllers.FooController.bar()
你必须写:
/foo foo.controller.FooController.bar()