Hey, has anyone else encountered problems since the release of spring-boot-starter-web on 2.7.0 ? For example:

I have a project using Spring-Boot Starter-Web. However, the update from 2.6.7 to version 2.7.0 seems to have caused problems:

@RestController
@RequestMapping("/api/v1/users")
public class UserController {

    @GetMapping("/{publicId}")
    public void getUserByPublicId(@PathVariable @NotBlank String publicId){
        System.out.println("404 if publicId null");
    }
}

@WebMvcTest(UserController.class)
public class UserControllerTest {
    ...

    @Test
    void testGetUserById3() throws Exception {
        mockMvc.perform(get("/api/v1/users/")) // null
            .andExpect(status().isBadRequest());
    }
}

The above test worked smoothly before. However, after the update a 404 error message is thrown when I specify null as a pathvariable.

Comment From: wilkinsona

Without @Validated on your UserController, I don't think @NotBlank will have any effect. I see the same behaviour between Spring Boot 2.6.7 and 2.7.0 so I don't think I understand the problem that you're seeing. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. That sample should work correctly with Spring Boot 2.6.7 and then start failing upon upgrade to Spring Boot 2.7.0. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: jbcbezerra

This ticket can be closed since it was only due to my lack of knowledge.