activiti工作流2-springboot打包支持

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/answer100answer/article/details/88386656

1. 加入springboot

续前一篇工程,在pom中加入spring boot及spring boot打包依赖:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    ...
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <!--引入springboot后 logback依赖删除-->
        <!--<dependency>-->
            <!--<groupId>ch.qos.logback</groupId>-->
            <!--<artifactId>logback-classic</artifactId>-->
            <!--<version>1.0.13</version>-->
        <!--</dependency>-->
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

打包方式jar。添加上述3个部分,并去掉logback依赖(会冲突)

此时可以通过mvn spring-boot:run 运行

mvn spring-boot:run

打包:

mvn clean package

选择java -jar方式运行。

java -jar xxx.jar

猜你喜欢

转载自blog.csdn.net/answer100answer/article/details/88386656