title: No mapping found with @RestController an @RequestMapping
body: <p>I have the following Controller</p>
  
  <pre><code>@RestController("/person")
  public class PersonController {
  
      @Autowired
      PersonService personService;
  
      @RequestMapping(value = "/list",
                      method = RequestMethod.GET,
                      produces = MediaType.APPLICATION_JSON_VALUE
                      )
      public List&lt;PersonNode&gt; getPersons(){
  
          return personService.getList();
  
      }
  
  }
  </code></pre>
  
  <p>Now the spring neo4j config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  
      &lt;!-- Scan the JavaConfig --&gt;
  
      &lt;context:annotation-config/&gt;
      &lt;context:component-scan base-package="server.infrastructure.repositories.neo4j.config" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>and spring mvc rest config:</p>
  
  
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
                      http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/context
                      http://www.springframework.org/schema/context/spring-context.xsd
                      http://www.springframework.org/schema/mvc
                      http://www.springframework.org/schema/mvc/spring-mvc.xsd"&gt;
  
      &lt;!--Used for Spring MVC configuration - must have--&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;!-- This shows where to scan for rest controller --&gt;
      &lt;context:component-scan base-package="server.api.rest.controller" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>and <code>web.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                              http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
  
  
      &lt;display-name&gt;Restful Web Application with Spring MVC 4.0.5x&lt;/display-name&gt;
  
      &lt;!-- Root App Context --&gt;
      &lt;!-- The definition of the Root Spring Context Container shared by all Servlets and Filters --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:spring/ApplicationContext.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Bootstrap the root application context.Creates the Spring Container shared by all Servlets and Filters --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Web App Settings --&gt;
      &lt;!-- Processes application requests --&gt;
      &lt;servlet&gt;
  
          &lt;servlet-name&gt;MR.rest.api&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/SpringMVC/SpringMVC-RESTContext.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;MR.rest.api&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>However when I refer to <code>http://localhost:8080/rest/person/list</code> i keep getting the:</p>
  
  <blockquote>
    <p>[http-bio-8080-exec-2] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/rest/person/list] in DispatcherServlet with name 'MR.rest.api'</p>
  </blockquote>
  
  <p>with my Tomcat startup log:</p>
  
  <pre><code>...
  INFO: Initializing Spring root WebApplicationContext
  01:50:55.703 [localhost-startStop-1] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
  01:50:55.774 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Wed Dec 16 01:50:55 CET 2015]; root of context hierarchy
  01:50:55.805 [localhost-startStop-1] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/ApplicationContext.xml]
  01:50:55.879 [localhost-startStop-1] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/Neo4j-DataSources.xml]
  01:50:56.254 [localhost-startStop-1] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'myNeo4jConfiguration' of type [class server.infrastructure.repositories.neo4j.config.MyNeo4jConfiguration$$EnhancerBySpringCGLIB$$7212f882] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  01:50:56.257 [localhost-startStop-1] INFO  o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslationPostProcessor
  01:50:56.683 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - Starting Post-processing phase
  01:50:56.684 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - Building annotation class map
  01:50:56.684 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - Building interface class map for 6 classes
  01:50:56.684 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - Registering default type converters...
  01:50:56.692 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - Post-processing complete
  01:50:56.692 [localhost-startStop-1] INFO  o.n.o.m.info.ClassFileProcessor - 6 classes loaded in 22 milliseconds
  01:50:56.974 [localhost-startStop-1] INFO  o.s.d.n.mapping.Neo4jMappingContext - Neo4jMappingContext initialisation completed
  01:50:57.088 [localhost-startStop-1] INFO  o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslator
  01:50:57.092 [localhost-startStop-1] INFO  o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslationInterceptor
  01:50:57.095 [localhost-startStop-1] INFO  o.s.d.n.config.Neo4jConfiguration - Initialising Neo4jTransactionManager
  01:50:57.130 [localhost-startStop-1] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1424 ms
  01:50:57.161 [localhost-startStop-1] INFO  o.s.web.servlet.DispatcherServlet - FrameworkServlet 'MR.rest.api': initialization started
  gru 16, 2015 1:50:57 AM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'MR.rest.api'
  01:50:57.165 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
  01:50:57.166 [localhost-startStop-1] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/SpringMVC/SpringMVC-RESTContext.xml]
  01:50:57.399 [localhost-startStop-1] INFO  o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/list],methods=[GET],produces=[application/json]}" onto public java.util.List&lt;server.infrastructure.persistence.neo4j.nodes.PersonNode&gt; server.api.rest.controller.PersonController.getPersons()
  01:50:57.626 [localhost-startStop-1] INFO  o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
  01:50:57.694 [localhost-startStop-1] INFO  o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
  01:50:57.758 [localhost-startStop-1] INFO  o.s.w.s.h.BeanNameUrlHandlerMapping - Mapped URL path [/person] onto handler '/person'
  01:50:57.826 [localhost-startStop-1] INFO  o.s.web.servlet.DispatcherServlet - FrameworkServlet 'MR.rest.api': initialization completed in 665 ms
  gru 16, 2015 1:50:57 AM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  </code></pre>
  
  <p>However, when I refer to <code>http://localhost:8080/rest/list</code> I get the expected list of persons.</p>
  
  <p>I want to refer to the <code>http://localhost:8080/rest/person/list</code> while using the <code>@RestController</code> for the person at class level and the `list' at the method level. How this can be done?</p>