Skip to content

3.1.4, 2.5.4 - UrlMappings choose incorrect controller #9849

@geekduck

Description

@geekduck

I created two controllers.

class WorkController {
    def index() { render "WorkController" }
}
class WorksheetController {
    def index() { render "WorksheetController" }
}

I've defined the following routes in UrlMappings.groovy

"/api/worksheet"(resources:"worksheet")
"/api/work"(resources:"work")

URL: /api/work shows "WorkController". This is correct.

URL: /api/worksheet shows "WorkController". This is incorrect.

And I found a workaround.

UrlMappings.groovy

"/api/work"(resources:"work")
"/api/worksheet"(resources:"worksheet")

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions