Java 如何以编程方式解决Play framework路由冲突

Java 如何以编程方式解决Play framework路由冲突,java,playframework,routing,Java,Playframework,Routing,我在应用程序中定义了两条路由,即 GET /resource/:resourceid ResourceController.getResourceById(resourceid : String) GET /resource/system SystemResourceController.getAllSystemResources() 上述路线相互冲突 我无法访问SystemResourceController中定义的getAllSystemResources() 将所有HTTP

我在应用程序中定义了两条路由,即

GET /resource/:resourceid  ResourceController.getResourceById(resourceid : String)
GET /resource/system       SystemResourceController.getAllSystemResources()
上述路线相互冲突

我无法访问SystemResourceController中定义的getAllSystemResources()

将所有HTTP GET请求发送到/resource/系统。路由到/resource/:resourceid

从下面链接的Play framework文档中

我发现路由优先级基于路由文件中提到的路由顺序


是否有任何方法可以解决此冲突?

更改顺序。将/resource/system的规则置于其他规则之前