title: web.servlet.PageNotFound ,Request method 'GET' not supported,Spring
body: <p>I encounter a strange problem in my Spring MVC Controller.</p>
  
  <p>I have four pages in my webapp folder</p>
  
  <p><img src="https://i.stack.imgur.com/3ttQI.jpg" alt="enter image description here"></p>
  
  <pre><code>@Controller
  public class WelcomeController {
  
      @RequestMapping(value="/wodi/welcome",method=RequestMethod.GET)
      public String welcome(){
          return "redirect:/pages/webwelcome.html";
      }
  }
  </code></pre>
  
  <p>Just now, it worked fine to find the page <code>http://localhost:8080/pages/webwelcome.html</code>, but now I have the error that the browser says:</p>
  
  <pre><code>There was an unexpected error (type=Method Not Allowed, status=405).
  Request method 'GET' not supported
  </code></pre>
  
  <p>I have no idea what I did that influence it.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/15492927/warn-org-springframework-web-servlet-pagenotfound-request-method-get-not-s">WARN : org.springframework.web.servlet.PageNotFound - Request method &#39;GET&#39; not supported</a></p>
  
  <p>But this is not the same case as mine since I am using "GET" method.</p>
  
  <p>Below is my Application.java to Boot the Spring app</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan({"hello","wodinow.weixin.jaskey"})
  public class Application {
  
      public static void main(String[] args) {
          ApplicationContext ctx = SpringApplication.run(Application.class, args);
  
          System.out.println("Let's inspect the beans provided by Spring Boot:");
  
          String[] beanNames = ctx.getBeanDefinitionNames();
          Arrays.sort(beanNames);
          for (String beanName : beanNames) {
              System.out.println(beanName);
          }
      }
  
      @Bean
      public CommandService commandService(){
          return CommandService.getInstance();
      }
  
  }
  </code></pre>