运行java jar和java cp时,spring boot没有主清单属性错误
我有一个应用程序,当我想运行时,使用java-jarmyjar。我犯了这样的错误
这是我的pom。xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>id.myapp.App</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
我已经定义了主类的位置。我也试着用
java-cpjava-cpmyjar。JARCOM。一些包裹。应用程序(类应用程序)
但是当我使用它时,我仍然得到了没有主清单属性的错误。我的应用程序使用Springboot应用程序。如何修复它?这个问题是在我的配置上还是在spring应用程序中
共 (0) 个答案