And right-click the project - Build (packaged into war for the first time) (the first Build)
- ReBuild (not packaged into war for the first time) (not the first build)
Do it one or several times in order, and you can successfully compile it into a war package
maven packaging method:
First go to the project root directory, then open cmd here, and then mvn package It can be packaged into war, and the packaged war file is in the target directory of the root directory