Skip to content

Combining ControllerClassNameHandlerMapping and @RequestMapping with relative value on Controller method doesn't work anymore [SPR-6475] #11141

Closed
@spring-projects-issues

Description

@spring-projects-issues

Hans Desmet opened SPR-6475 and commented

The controller beans xml file contains:


<context:component-scan base-package="org.example.web"/>
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>

The Controller class:


package org.example.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ArticlesController {
@RequestMapping("all") // all == a relative URL
public String findAll() {
return "/WEB-INF/JSP/allArticles.jsp";
}
}

Spring 2.5


A GET request with the URL /articles/all was processed by the function findAll

Spring 3.0 RC2


A GET request with the URL /articles/all produces HTTP 404 error.


Affects: 3.0 RC2

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