Skip to content

WebDataBinder getTarget() get 请求返回null #33605

@attachmentList

Description

@attachmentList

I am a beginner and learning springboot

springboot 3.2+ WebDataBinder getTarget() get request returns null

@InitBinder
public final void dataBinder(WebDataBinder binder) {
if (binder.getTarget() instanceof BaseCondition baseCondition) {
binder.addValidators(baseCondition);
}
}

binder.getTarget() == null; Version 3.1.12 is available

public interface BaseCondition extends Validator {

}

public class LoginCondition implements BaseCondition {

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions