1 每个工程都要添加打包的依赖
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.2.RELEASE</version>
<configuration>
<!--指定启动类-->
<mainClass>com.jt.ProviderApplication</mainClass>
</configuration>
<!--打包依赖-->
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
2 maven栏执行package打包
3 找到打包文件,测试是否成功启动
前提是nacos服务要启动,将来在Linux系统下也要启动nacos等服务