Skip to content

@ModelAttribute(binding=false) is not honored with WebFlux #26856

@johnyannj

Description

@johnyannj

Given...

public class User {
    private String name;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

And...

@RestController
public class DemoController {

    @GetMapping("/hello")
    public Mono<String> hello(@ModelAttribute(binding = false) User user) {
        return Mono.just(user.getName());
    }
}

... when I call http://localhost:8080/hello?name=xxxx , I get "xxxx" for WebFlux but "" for Web MVC.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions