Spring Boot not mapping controller paths after upgrade to 2.6.4

Viewed 175

I have a Spring Boot application which I upgraded from 2.0.4 to 2.6.4, but since the update it doesn't appear to mapping ANY of the controller paths anymore.

Normally, at startup, the console output specifies every path that has been mapped, but it no longer does that and every URL I visit returns not found.

My controllers are all inside a package called 'controllers' inside the project, and they're all annotated with @Controller and @RequestMapping.

Here's a copy of my main application file.

@SpringBootApplication
@EnableScheduling
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}

After making a request, I see the following in the console output, it seems to be insinuating that it can't find the jsp files?

2022-02-07 17:11:56.998  WARN 29055 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler     : "Path with "WEB-INF" or "META-INF": [WEB-INF/view/app/login.jsp]"
2022-02-07 17:11:57.009  WARN 29055 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler     : "Path with "WEB-INF" or "META-INF": [WEB-INF/view/exception/error.jsp]"

Does anyone know why this might be happening?

1 Answers

I fixed this by re-adding the tomcat-embed-jasper dependency.

<dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>
Related