I am trying to develop a new Spring boot application using MVC as a first step to move my existing Spring MVC application to Spring boot.
However, I am facing an is
Remove @EnableWebMvc annotation from your Spring Boot class. By default with @SpringBootApplication enables your application as web application. Declaring @EnableWebMvc explicitly will disable the auto configuration and Auto setting up DispatcherServlet will be overridden which is causing you the issue.
Using the directory src/main/webapp/WEB-INF/jsp/.. is discouraged if you want to deploy via a jar package.
“Do not use the src/main/webapp folder if your application will be packaged as a jar. Although this folder is a common standard, it will only work with war packaging and it will be silently ignored by most build tools if you generate a jar.”
Reference: https://docs.spring.io/spring-boot/docs/1.1.4.RELEASE/reference/htmlsingle/#using-boot-structuring-your-code