Python 官方文档:入门教程 => 点击学习
目录SpringBoot打jar包遇到的xml文件丢失在pom.xml的build标签中添加如下内容springBoot打jar包遇到的一些问题1.访问不到jsp页面1.1 jar包
指定资源路径
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>***.*</include>
</includes>
</resource>
</resources>
原因:没有添加jsp打包路径
解决方案:在pom.xml中添加如下代码
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>***.java
</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/WEBapp</directory>
<!--注意此次必须要放在此目录下才能被访问到 -->
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
</build>
原因:Maven编译版本问题
解决方案:将版本改为1.4.2.RELEASE(目前只有这个版本打jar包才能解析jsp)
Failed to execute Goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) on project fulan-demo: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:repackage failed: Unable to find a single main class from the following candidates
原因:没有指定启动类的位置
解决方案:在pol.xml中指定启动类
<properties>
<start-class>com.xxx.xxx.xxxApplication</start-class>
</properties>
以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程网。
--结束END--
本文标题: SpringBoot打jar包遇到的xml文件丢失的解决方案
本文链接: https://www.lsjlt.com/news/136928.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0