Previous packaged in accordance with this blog is to play package: Idea tools SpringBoot item labeled executable jar package
I still look back Silicon Valley video found a better packing method:
Click the left and right corners, click the maven packet, you can execute package
Note that it must be springboot project, because the project will automatically generate springboot:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Of course, if you are not springboot project (maven projects, etc.) you need to insert the plug-in before the start,