When I am running this app from IDE, it is working fine, but when app running from the command line, it gives me the following error:
http://localhost:8080/welcome
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Dec 30 21:46:01 BDT 2021 There was an unexpected error (type=Not Found, status=404)
My controller is :
package com.example.demo;
@Controller
public class HelloController {
@RequestMapping("/welcome")
public String home() {
System.out.println("this is home page");
return "home";
}
}
application.properties
spring.mvc.view.prefix=/views/
spring.mvc.view.suffix=.jsp
Jsp file loction is :
webapp\views\home.jsp