Skip to content

Commit

Permalink
Fixing issue with PathVariables to comply with Spring Framework 6
Browse files Browse the repository at this point in the history
  • Loading branch information
pmedcraft committed Apr 9, 2024
1 parent 6a7e446 commit a66d5cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public IshController() {
*/
@RequestMapping(method = {GET, POST}, value = "/api/page/{publicationId}/{pageId}/**",
produces = {APPLICATION_JSON_VALUE})
public ModelAndView getPage(@PathVariable Integer publicationId,
@PathVariable Integer pageId,
public ModelAndView getPage(@PathVariable("publicationId") Integer publicationId,
@PathVariable("pageId") Integer pageId,
@RequestParam(value = "conditions", defaultValue = "") String conditions,
final HttpServletRequest request,
final HttpServletResponse response) throws ContentProviderException, IOException {
Expand Down Expand Up @@ -148,8 +148,8 @@ public ModelAndView getPage(@PathVariable Integer publicationId,
@RequestMapping(method = GET, value = "/binary/{publicationId}/{binaryId}/**", produces = MediaType.ALL_VALUE)
@ResponseBody
public void getBinaryResource(HttpServletResponse response,
@PathVariable String publicationId,
@PathVariable String binaryId) throws ContentProviderException, BadRequestException, NotFoundException, IOException {
@PathVariable("publicationId") String publicationId,
@PathVariable("binaryId") String binaryId) throws ContentProviderException, BadRequestException, NotFoundException, IOException {
int publicationIdInt = -1;
try {
publicationIdInt = Integer.parseInt(publicationId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ private List<Topic> getTopics(DynamicWidget dynamicWidget, List<Topic> topics, P
*/
@RequestMapping(method = GET, value ="/binary/{publicationId}/{binaryId}/**" ,produces = MediaType.ALL_VALUE)
@ResponseBody
public ResponseEntity<InputStreamResource> getBinaryResource(@PathVariable Integer publicationId,
@PathVariable Integer binaryId)
public ResponseEntity<InputStreamResource> getBinaryResource(@PathVariable("publicationId") Integer publicationId,
@PathVariable("binaryId") Integer binaryId)
throws ContentProviderException, IOException {

HttpHeaders responseHeaders = new HttpHeaders();
Expand Down

0 comments on commit a66d5cf

Please sign in to comment.