Only retained 'name' attribute for '@RequestParam(name="page",

defaultValue = "1") int page' where necessary.
This commit is contained in:
nirsa 2025-04-03 14:49:33 +09:00
parent efff33c609
commit 7d11899d1f
2 changed files with 3 additions and 3 deletions

View file

@ -32,9 +32,9 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import jakarta.validation.Valid;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
/**
* @author Juergen Hoeller
@ -90,7 +90,7 @@ class OwnerController {
}
@GetMapping("/owners")
public String processFindForm(@RequestParam(defaultValue = "1") int page, Owner owner, BindingResult result,
public String processFindForm(@RequestParam(name="page", defaultValue = "1") int page, Owner owner, BindingResult result,
Model model) {
// allow parameterless GET request for /owners to return all records
if (owner.getLastName() == null) {

View file

@ -75,4 +75,4 @@ class VetController {
return vets;
}
}
}