Skip to content

@Validated don't work on interface #17000

Closed
@longscoop

Description

@longscoop

Springcloud is used in the project, but returns 404

@Validated
public interface ValidClient {

	@GetMapping("/valid")
	String queryById(@RequestParam("id") @Min(1) @Max(400) Integer id);

}
@RestController
public class ValidController implements ValidClient {

	@Override
	public String queryById(@Min(1) @Max(400) Integer id) {
		return "id:" + id;
	}
}

Springcloud is used in the project, but returns 404,the Validated don't work on interface ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: 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