Javaplay将路由文件放在子目录中
是否可以从Java Play的路由在单独的目录中吗? 2.8.x)
(假设播放
-> /admin FIXME
conf/conf/routes-dir/admin.Routes
据我所知,唯一的选项是将admin.Routes
移动到conf/conf/目录。然后,
路由
文件看起来像这样
-> /admin admin.Routes
,但是,我想将所有路由文件保留在单独的目录中
Is it possible to make reference from Java Play's routes file to another route file that is in a separate directory?
(assuming Play 2.8.x)
For example, consider the content of conf/routes
-> /admin FIXME
I need the FIXME
placholder to reference the admin.routes
file inside conf/routes-dir/admin.routes
As far as I know, the only option is to move admin.routes
to conf/
directory. Then, routes
file would look like this
-> /admin admin.Routes
However, I want to keep all routes files inside separate directory
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
中的自定义目录
您可以将自定义目录添加到conform build.sbt
,或者
如果需要从内conf文件夹中添加路由,则必须用于
检查结果,您可以将其用于打印结果来控制
in sbt
文档
中 - 对此的模块,因为您将在ReverCroutes生成中遇到问题(仅从一个路由文件中生成)
更多有关散布路线文件的信息
You can add your custom directory with routs files to config
build.sbt
or
If you need add routes from inner conf folder, you must use
for checking results you can use this for print results to console
in Sbt documentation
Update ATTENTION
Please use multi-module for this, because you will take a problem with RevercRoutes generation (will be generated only from one routes file)
MORE information about splitting route file