1. The purpose of this post
When build springboot app as war file, sometime we encounter this exception:
2. Environments
3. The solution
3.1 The original pom
Before solve , we can look at the original pom.xml
3.2 The right pom
We should add maven-war-plugin to build springboot as war file:
And pay attention to the version of the maven-war-plugin, it must be 3.0.0+, or else you must add as follows:
Hope it helps for you.