Francois Lacoursiere
Francois Lacoursiere

Reputation: 131

mvn spring-boot:run vs intellij run

I have an app that is a simple HelloWorld with Thymeleaf.

When I run it with : mvn spring-boot:run, everything works like a charm

When I run it with IntelliJ I get this error 'This application has no explicit mapping for /error, so you are seeing this as a fallback.' and there are no logs at the console. I tried rebuilding the project from Intellij, I have simplified my pom and sources to the simplest expression by removing extraneous dependencies and classes not relevant to it, nothing does it.

I created another project in IntelliJ from scratch and I managed to get it working right away with both the IDE and maven.

What can cause a project to go haywire like that ? Any hard clean or cue on what I could do to get my project working ?

Upvotes: 2

Views: 2002

Answers (1)

Saeed
Saeed

Reputation: 33

It's a known issue of IntelliJ. I assume you may remove <scope>provided</scope> parts in pom.xml file to get rid of the problem. It probably works correctly with Spring Boot but to package it in .war to run on Tomcat, you need to put them back and use mvn package. The issue is already described here: https://youtrack.jetbrains.com/issue/IDEA-107048

Upvotes: 1

Related Questions