markdown Spring Boot可运行的jar

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Spring Boot可运行的jar相关的知识,希望对你有一定的参考价值。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>group</groupId>
  <artifactId>artifact</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>artifact</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
            <configuration>
              <classifier>spring-boot</classifier>
              <mainClass>group.App</mainClass>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
Documentation

https://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/maven-plugin/

Usage

```
> mvn clean package
...
> java -jar target\artifact-1.0-SNAPSHOT-spring-boot.jar
...
```

以上是关于markdown Spring Boot可运行的jar的主要内容,如果未能解决你的问题,请参考以下文章

[转]Spring Boot应用的后台运行配置

使用 spring boot 运行单元测试,“没有可运行的方法”错误

markdown Spring Boot Estructura

markdown spring boot整合hbase最佳实践

markdown 使用Arthas进行Spring Boot热更新

markdown Anotaciones de Spring-boot