1.使用idea打包
选择module
选择Main Class
build
2.使用maven打包
<build> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>com.demo.Test</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build>
mvn clean
mvn package