Skip to content

Dot in RequestMapping path prevents paths from combination [SPR-10595] #15224

@spring-projects-issues

Description

@spring-projects-issues

Ivan Sopov opened SPR-10595 and commented

The following controller does work exposing urls "v1/customers" and "v1/suppliers":

@Controller
@RequestMapping(value ="v1/", method = RequestMethod.GET)
public class SampleController {

	@ResponseBody
	@RequestMapping(value = "customers")
	public String getCustomers(){...}

	@ResponseBody
	@RequestMapping(value = "suppliers")
	public String getSuppliers(){...}
}

The following controller does nto work, trying to map both methods to "v1.0/" url:

@Controller
@RequestMapping(value ="v1.0/", method = RequestMethod.GET)
public class SampleController {

	@ResponseBody
	@RequestMapping(value = "customers")
	public String getCustomers(){...}

	@ResponseBody
	@RequestMapping(value = "suppliers")
	public String getSuppliers(){...}
}

While the following controller does work exposing "v1.0/customers" and "v1.0/suppliers":

@Controller
@RequestMapping(method = RequestMethod.GET)
public class SampleController {

	@ResponseBody
	@RequestMapping(value = "v1.0/customers")
	public String getCustomers(){...}

	@ResponseBody
	@RequestMapping(value = "v1.0/suppliers")
	public String getSuppliers(){...}
}

Affects: 3.2.3

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions