[ROO-3924] Thymeleaf view name mapping has a leading "/" for list views Created: 14/Aug/17  Updated: 29/Aug/17  Resolved: 29/Aug/17

Status: Resolved
Project: Spring Roo
Component/s: GENERAL OBJECTS
Affects Version/s: 2.0.0.RC1
Fix Version/s: 2.0.0.RC2

Type: Bug Priority: Major
Reporter: Robert Gause Assignee: Juan Carlos García del Canto
Resolution: Complete Votes: 0
Labels: roo
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX 10.12.6
Java 1.8.0_112
Maven 3.5.0
Spring Roo 2.0.0.RC1



 Description   

For an entity CustomerType, an aspect called CustomerIdTypesCollectionThymeleafController_Roo_Thymeleaf is generated.

The aspect has a list handling method:

@GetMapping(name = "list")
public ModelAndView CustomerIdTypesCollectionThymeleafController.list(Model model)

{ return new ModelAndView("/customeridtypes/list"); }

It should generate as:

@GetMapping(name = "list")
public ModelAndView CustomerIdTypesCollectionThymeleafController.list(Model model)

{ return new ModelAndView("customeridtypes/list"); }

The leading slash works when the app is run via "mvn spring-boot run", but not when the app is run via the exec-jar. Removing the leading "/" corrects this.

Thanks,
Bob



 Comments   
Comment by Robert Gause [ 14/Aug/17 ]

This is related to these issues:

https://github.com/spring-projects/spring-boot/issues/1744
https://github.com/spring-projects/spring-boot/issues/2057

Comment by Juan Carlos García del Canto [ 29/Aug/17 ]

Solved. Removed the "/" during the generation of some @ModelAndView@ constructor

Generated at Sun Dec 15 13:36:17 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.