zoukankan      html  css  js  c++  java
  • Spring boot 线上部署

    1.修改Spring Boot

    1.添加:spring-boot-maven-plugin 插件

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

    打包格式按照:

    <groupId>com.smartom</groupId>
    <!--打包按照这个名称进行打包-->
    <artifactId>MyWeb</artifactId>
    <!--打包生成的版本号-->
    <version>0.0.1</version>

    2.进行打包

    mvn package

    3.运行

    java -jar xxxx.jar 

    其他问题:

    1.第三方包 打包

    mvn 打包
    mvn install:install-file -Dfile=libjdom.jar -DgroupId=org.jdom -DartifactId=jdom -Dversion=1.1.0 -Dpackaging=jar -DgeneratePom=true
    重要参数:
    Dfile:打包路径
    DgroupId:对应 groupid
    DartifactId: 对应artifactId
    Dversion:对应版本号

    然后在加入pom.xml文件
      <dependency>
          <groupId>org.jdom</groupId>
          <artifactId>jdom</artifactId>
          <version>1.1.0</version>
        </dependency>

    pom.xml加载本地jar包

    <dependency>
    
        <groupId>org.wltea.analyzer</groupId>
        <artifactId>IKAnalyzer</artifactId>
        <version>2012_u6</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/lib/jdom.jar
    </systemPath> </dependency>

    2.项目中包含多个main

  • 相关阅读:
    [CF1469D] Ceil Divisions
    [CF632D] Longest Subsequence
    [CF1215E] Marbles
    [CF689D] Friends and Subsequences
    [CF707D] Persistent Bookcase
    [CF10D] LCIS
    [CF713C] Sonya and Problem Wihtout a Legend
    [CF1114E] Arithmetic Progression
    [CF1404B] Tree Tag
    [CF710E] Generate a String
  • 原文地址:https://www.cnblogs.com/subtract/p/9076355.html
Copyright © 2011-2022 走看看