提示不存在的原因是
父工程中,创建生成的pom.xml中有着这样的build
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.7.RELEASE</version>
<configuration>
<mainClass>com.pdsu.daiguabao.DaiguabaoApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
,解决办法:
把这个build中的<pligin>标签去掉
或者改为这样的
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.3.7.RELEASE</version> <configuration> <classifier>exec</classifier>
<mainClass>com.pdsu.daiguabao.DaiguabaoApplication</mainClass> </configuration> </plugin> </plugins> </build>
重新打包解决