Skip to content

@RequestMapping type-level params not taken into account consistently [SPR-5421] #10095

Closed
@spring-projects-issues

Description

@spring-projects-issues

Ken Sipe opened SPR-5421 and commented

Given the following code:
@Controller
@RequestMapping(param="ex")
public class BookController {

@RequestMapping
public void index() {  }

@RequestMapping(param="id")
public void show() {  }

}

one would expect that in order to invoke either request mapping that an "ex" parameter woud need to be present in the request. so /book/index?ex=a or /book/show?id=1&ex=a . however testing this out, the param requires are as expected for the show method... however a simple /book/index works without a parameter on the index. As I think this through, it is the only default request mapping, however given the restriction on the type shouldn't this request fail with no matching mapping?


Affects: 3.0 M1

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions