The maven packaged springboot project runs prompts that there is no main manifest property in the jar

After the project is packaged by maven, use the java -jarcommand to run, prompting the following error:

pocket@mac java -jar eureka-server-1.0-SNAPSHOT.jar --spring.profiles.active=peer1
eureka-server-1.0-SNAPSHOT.jar中没有主清单属性

Solution:
Add the plugin to the pom file and spring-boot-maven-pluginrepackage it:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326615428&siteId=291194637