问题

打包出来的jar包里面没有html,js,css文件

解决方案

pom.xml文件下的build选项中的src/main/resources的目录下 添加配置

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.css</include>
<include>**/*.js</include>
<include>**/*.html</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>

部署springboot项目时 打包成jar时包中html,js,css文件缺失的更多相关文章

  1. BOOT项目依赖另外一个模块的包,开发的时候都正常,执行clean package打包成jar时却提示依赖的模块包不存在。

    我在service1模块里依赖了common模块,开发的时候包都能正常引用到,启动也能正常测试访问,可是奇怪的是,当我要打包成jar包时,就提示service1里依赖common的包都不存在,之前从没 ...

  2. java中调用本地动态链接库(*.DLL)的两种方式详解和not found library、打包成jar,war包dll无法加载等等问题解决办法

    我们经常会遇到需要java调用c++的案例,这里就java调用DLL本地动态链接库两种方式,和加载过程中遇到的问题进行详细介绍 1.通过System.loadLibrary("dll名称,不 ...

  3. springboot项目打包成jar/war包

    springboot项目打包过程中包含第三方jar 开发IDE是IntelliJ IDEA,数据库是mysql,内置服务器tomcat. 打包步骤: 1. 确定项目调试运行没问题 2. 将第三方jar ...

  4. eclipse将项目打包成jar在linux中运行

    最近因为项目需要,做了几个外挂程序做数据传输,涉及到项目打包操作,在此记录一下打包步骤和其中出现的问题. 1.首先右键项目文件夹,点击export,弹出如下选择框,在其中输入jar搜索,并选择JAR ...

  5. springboot项目如何打包成war包

    一.修改打包形式 在pom.xml里设置 <packaging>war</packaging> 二.移除嵌入式tomcat插件 在pom.xml里找到spring-boot-s ...

  6. Springboot中如何引入本地jar包,并通过maven把项目成功打包成jar包部署

    最近尝试引入阿里云的短信验证码,阿里云的core sdk是maven就有的,但是短信相关的jar包却不是放在maven的,所以得引入本地的下载回来的jar包.本地开发直接引入,idea是可以直接跑调用 ...

  7. SpringBoot通过maven打包成jar,设定主清单属性。

    文章目录 原来普通的jar包一直是 <build> <plugins> <plugin> <groupId>org.apache.maven.plugi ...

  8. SpringBoot项目 maven打包时候提示程序包xxx不存在

    A模块依赖B模块 A打包的时候会报程序包xxx不存在 这时候我们看下B模块的pom.xml文件是否加了 <build> <plugins> <plugin> < ...

  9. 用gradle把springboot项目打包成jar

    ``` 用gradle把springboot项目打包成jar ```### build.gradle 中添加 buildscript { repositories { mavenLocal() mav ...

随机推荐

  1. C++ 第二次实验

    实验内容: 1.函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法.在main()函数中定义不同类型 数据,调用测试. #include <io ...

  2. qs.stringify和JSON.stringify()

    var a = {name:'hehe',age:10}; qs.stringify(a) // 'name=hehe&age=10' JSON.stringify(a) // '{" ...

  3. Mac上安装Charles进行抓包全流程设置

    安装 -- 官网下载最新版的Charles版本,按照提示安装即可 破解 -- https://blog.csdn.net/qq_25821067/article/details/79848589. M ...

  4. linux pwd命令 显示当前所在路径

    pwd 显示当前所在路径 [root@MongoDB ~]# pwd /root

  5. js 获取url具体参数

    用JS获取地址栏参数的方法(超级简单) 方法一:采用正则表达式获取地址栏参数:( 强烈推荐,既实用又方便!) function GetQueryString(name) { var reg = new ...

  6. 【LeetCode每天一题】Set Matrix Zeroes(设置0矩阵)

    Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Exampl ...

  7. Mac下创建证书失败

    gdb调试运行出错,需要创建证书 按网上说的,到最后一步直接,按默认创建login类的证书 然后导出证书 再将这个证书导入到系统中

  8. 5+移动App

    1.5+ App开发入门指南 https://www.cnblogs.com/tuyile006/p/5395909.html 2.5+ App开发Native.js入门指南 http://ask.d ...

  9. c# webapi上传、读取、删除图片

    public class FileAPIController : BaseController    {        private readonly string prefix = "t ...

  10. talend工具中往oracle插数据报ORA-01461: can bind a LONG value only for insert into a LONG colum

    今天使用talend往oracle插数据报ORA-01461: can bind a LONG value only for insert into a LONG column 数据源是mysql,开 ...