-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Open
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task
Milestone
Description
From the blog and the docs, here is the expected behavior of the baseline version feature (using the + operator):
When you specify a version with the plus syntax (e.g., version = "1.2+") in a @RequestMapping (or derived annotation like @GetMapping), it declares that the controller method handles requests for that specific version and all subsequent supported versions.
So given the following controller:
@RestController
@RequestMapping(path = "{version}/todos")
public class TodoController {
@GetMapping(version = "v1.2+")
public List<Todo> getTodosV1_2() {
return List.of(new Todo(1L, "Learn Spring Boot 4 - v1.2+", false));
}
}and the following configuration:
spring:
mvc:
apiversion:
use:
path-segment: 0I'd expect these requests to return 200 OK:
/v1.2/todos/v1.2.1/todos
But instead I'm getting a 400 BAD_REQUEST for # 2.
I pushed a small example reproducing the bug (or my error...).
Could you take a look please?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task