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=lib\jdom.jar -DgroupId=org.jdom -DartifactId=jdom -Dversion=1.1. -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

Spring boot 线上部署的更多相关文章

  1. Node+mongodb线上部署到阿里云

    Node+mongodb线上部署到阿里云 部署使用的主要工具是pm2+nginx,使用码云的私有仓库,自动部署到服务器,私有仓库和服务器要事先设置好免密码登录.使用DNSPOD进行域名解析.事先准备好 ...

  2. Spring Boot 文件上传原理

    首先我们要知道什么是Spring Boot,这里简单说一下,Spring Boot可以看作是一个框架中的框架--->集成了各种框架,像security.jpa.data.cloud等等,它无须关 ...

  3. 【Maven篇】---解决Maven线上部署java.lang.ClassNotFoundException和no main manifest attribute解决方法

    一.前述 maven 线上部署的话会出现一些问题比如java.lang.ClassNotFoundException或者no main manifest attribute的话,是因为maven 配置 ...

  4. 关于docker线上部署时间问题

    背景 公司线上部署采用docker swarm方式,这几天线上项目时间突然出了问题(ps:第一反应,我去,这也能出问题,代码里肯定藏毒了),线上时间总跟实际时间差八个小时.本着速战速决的原则,把所有时 ...

  5. spring boot文件上传、下载

    主题:Spring boot 文件上传(多文件上传)[从零开始学Spring Boot]http://www.iteye.com/topic/1143595 Spring MVC实现文件下载http: ...

  6. FastAdmin 线上部署流程 (2018-05-03 更新)

    FastAdmin 线上部署流程 首次部署 建立 git 环境. 建立 composer 环境. 建立 bower 环境. 将远程项目代码 git clone 到服务器上. 执行 composer i ...

  7. vue-router+webpack线上部署时单页项目路由,刷新页面出现404问题

    使用vue项目,线上部署的时候,访问首页以及通过路由打开二级页面没有问题,但是一刷新就出现404现象 因为刷新页面时访问的资源在服务端找不到,因为vue-router设置的路由不是真实存在的路径. 解 ...

  8. Django线上部署教程:腾讯云+Ubuntu+Django+Uwsgi(转载)

    网站名称: 向东的笔记本 本文链接: https://www.eastnotes.com/post/29 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议.转载请注明出处! ...

  9. Spring框架学习笔记(7)——Spring Boot 实现上传和下载

    最近忙着都没时间写博客了,做了个项目,实现了下载功能,没用到上传,写这篇文章也是顺便参考学习了如何实现上传,上传和下载做一篇笔记吧 下载 主要有下面的两种方式: 通过ResponseEntity实现 ...

随机推荐

  1. 东芝L10安装Centos5.5

    为什么安装5.5:因为高版本的需要PAE设定但是老电脑不支持,偶又不想重新编译内核,so... 1.  安装之前需要把电脑格式化(我是整机安装Linux),否则会报not enough space l ...

  2. .NET 并行计算和并发10-lock锁

    class Program { private static List<int> intlist; static void Main(string[] args) { intlist = ...

  3. 运维shell脚本函数语法

    在fun.sh 文件里,使用函数来封装脚本内容 usege() { echo "hello world" echo "脚本怎么使用函数......"}usege ...

  4. java实现截图功能

    package Jietu; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Robot; import j ...

  5. java8-lambda常用语法示例

    常用语法示例: public static void main(String[] args) { List<OrderInfo> orderInfoList = Lists.newArra ...

  6. VO、AO、执行环境和作用域链

    1.变量对象(variable object) 原文:Every execution context has associated with it a variable object. Variabl ...

  7. 2018—自学Selenium+Python 笔记(二)

    此文记录一些python语法不同之处.. 适合有研发基础的童鞋查阅.. 零基础的童鞋就怪怪一个个学吧! 记录也不一定全,随笔一记 多行语句 total=item1+\ item2+\ item3 &q ...

  8. iOS Masonry控件等比例布局

    一.先解释相关API 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 /**  *  distribute with fixed spacing  *  *  ...

  9. Adjacency matrix based Graph

    Interface AddVertex(T data) AddEdge(int from, int to) DFS BFS MST TopSort PrintGraph using System; u ...

  10. jQuery-4.动画篇---淡入淡出效果

    jQuery中淡出动画fadeOut 让元素在页面不可见,常用的办法就是通过设置样式的display:none.除此之外还可以一些类似的办法可以达到这个目的.这里要提一个透明度的方法,设置元素透明度为 ...