Skip to content

@RequestMapping is not resolved with springsource dm-server-ee-1.0.1 [SPR-5366] #10039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Dec 16, 2008 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)

Comments

@spring-projects-issues
Copy link
Collaborator

Thomas Koeppen opened SPR-5366 and commented

we have the following configuration, that works fine with dm-server 1.0.1 (spring 2.5.6), but fails with dm-server-ee-1.0.1 (imported lib org.springframework.spring.instrumented)

application-web.xml

<context:component-scan base-package="com.foo.api" />
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
<bean name="viewResolver"
    class="org.springframework.web.servlet.view.XmlViewResolver">
</bean>
class com.foo.api.FooController

@Controller("fooController")
public class FooController extends MultiActionController implements HandlerExceptionResolver {

@RequestMapping("/name")
	public ModelAndView listTags(@RequestParam(required=false, value="aVar") String aVar) {
....

/name was not resolved

[2008-12-16 18:54:50.351] TP-Processor2 org.springframework.web.servlet.PageNotFound.unknown W No mapping found for HTTP request with URI [/name] in DispatcherServlet with name 'foo-DispatcherServlet'

currently i am uncertain, if it is false configuration on our side, a dm-server bug or springframework issue, so creating this issue here first


Affects: 2.5.6

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 16, 2008

Thomas Koeppen commented

i found a similiar workaround as in #8808,

i added urlMapping as workaround to application-web.xml to map /name manually, but want to used to simple DefaultAnnotationHandlerMapping

<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <value>
            /name=fooController
        </value>
    </property>
    <property name="alwaysUseFullPath">
        <value>true</value>
    </property>
</bean>

@spring-projects-issues
Copy link
Collaborator Author

Thomas Koeppen commented

bug occurs, if i use (but this is what i need)

@Controller
public class FooMultiActionController implements HandlerExceptionResolver

with out HandlerExceptionResolver it works:

@Controller
public class FooMultiActionController

any ideas?

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I cannot reproduce this against Spring 3.0 M3, at least not for the "implements HandlerExceptionResolver" case. This works just fine. It does not work, however, when extending MultiActionController! This is indicating the wrong kind of contract... An @RequestMapping-based controller should never extend that base class. Have you actually tried the case where you implement HandlerExceptionResolver but do not extend MultiActionController? If you can reproduce this against Spring 3.0 M3 (e.g. on plain Tomcat), let me know.

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: bug A general bug label Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)
Projects
None yet
Development

No branches or pull requests

2 participants