What if SpringBoot does not have the main list attribute?
This article mainly introduces how to do without the main list attribute of SpringBoot, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
Resolve that SpringBoot does not have a master list attribute
Problem: after SpringBoot is packaged into jar, the run prompt does not have the main list attribute.
Solution: complete the bulid information in maven
Org.springframework.boot spring-boot-maven-plugin ${spring.version} repackage
Reason:
Because I use spring-boot-dependencies BOM instead of spring-boot-starter-parent parent POM (see 13.2.2 for details. Using Spring Boot without the parent POM)
As a result, the configuration item for spring-boot-maven-plugin is lost, and the MANIFEST.MF file in the packaged jar is missing Main-Class.
PS: when the packaging type is jar, the packaging process for spring-boot-maven-plugin is completely different from using maven-jar-plugin directly. The structure of the generated jar directory is also very different.
Thank you for reading this article carefully. I hope the article "what to do without the main list attribute of SpringBoot" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!