SpringBoot导入jsp依赖始终报错

先粘出我自己的pom代码:

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <parent>
 6         <groupId>org.springframework.boot</groupId>
 7         <artifactId>spring-boot-starter-parent</artifactId>
 8         <version>1.5.6.RELEASE</version>
 9         <relativePath/> <!-- lookup parent from repository -->
10     </parent>
11     <groupId>com.sblueice</groupId>
12     <artifactId>demo</artifactId>
13     <version>0.0.1-SNAPSHOT</version>
14     <packaging>war</packaging>
15     <name>demo</name>
16     <description>Demo project for Spring Boot</description>
17
18     <properties>
19         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21         <java.version>1.8</java.version>
22     </properties>
23
24     <dependencies>
25         <dependency>
26             <groupId>org.springframework.boot</groupId>
27             <artifactId>spring-boot-starter-web</artifactId>
28         </dependency>
29         <dependency>
30             <groupId>javax.servlet</groupId>
31             <artifactId>javax.servlet-api</artifactId>
32             <scope>provided</scope>
33         </dependency>
34
35          <!--支持jsp -->
36         <dependency>
37               <groupId>javax.servlet</groupId>
38               <artifactId>jstl</artifactId>
39               <version>1.2</version>
40         </dependency>
41
42        <dependency>
43         <groupId>com.mchange</groupId>
44         <artifactId>c3p0</artifactId>
45         <version>0.9.5.2</version>
46     </dependency>
47         <!-- 设置为provided是在打包时会将该包排除,因为要放到独立的tomcat中运行,是不需要的。 -->
48         <dependency>
49             <groupId>org.springframework.boot</groupId>
50             <artifactId>spring-boot-starter-tomcat</artifactId>
51             <scope>provided</scope>
52         </dependency>
53         <dependency>
54             <groupId>org.springframework.boot</groupId>
55             <artifactId>spring-boot-starter-test</artifactId>
56             <scope>test</scope>
57         </dependency>
58         <dependency>
59             <groupId>org.springframework.boot</groupId>
60             <artifactId>spring-boot-devtools</artifactId>
61             <optional>true</optional>
62         </dependency>
63                 <dependency>
64             <groupId>org.springframework.boot</groupId>
65             <artifactId>spring-boot-starter-jdbc</artifactId>
66         </dependency>
67         <dependency>
68             <groupId>org.mybatis.spring.boot</groupId>
69             <artifactId>mybatis-spring-boot-starter</artifactId>
70             <version>1.3.2</version>
71         </dependency>
72         <dependency>
73             <groupId>mysql</groupId>
74             <artifactId>mysql-connector-java</artifactId>
75             <scope>runtime</scope>
76         </dependency>
77
78     </dependencies>
79
80     <build>
81         <plugins>
82             <plugin>
83                 <groupId>org.springframework.boot</groupId>
84                 <artifactId>spring-boot-maven-plugin</artifactId>
85             </plugin>
86            <plugin>
87                  <groupId>org.apache.maven.plugins</groupId>
88                  <artifactId>maven-compiler-plugin</artifactId>
89                  <version>3.1</version>
90                  <configuration>
91                      <source>1.8</source>
92                      <target>1.8</target>
93                  </configuration>
94            </plugin>
95         </plugins>
96     </build>
97
98 </project>

修改一:先说父类依赖版本号,根据百度由2.0.1改为了1.5.6

修改二:再说导入jsp依赖的报错:Missing artifact org.apache.tomcat.embed:tomcat-embed-jasper:jar:8.5.16

如果不添加jsp依赖,就直接下载jsp文件,添加了就报错,现在我已经懵了。。。。

记录一下,有大神解答更是求之不得!!!

原文地址:https://www.cnblogs.com/steveshao/p/11643603.html

时间: 2024-08-28 23:46:29

SpringBoot导入jsp依赖始终报错的相关文章

SpringBoot导入mail依赖报错

报错:Missing artifact org.springframework.boot:spring-boot-starter-mail:jar:2.0.3 之前导入log4j时报的一样的错误,最后没解决,用的slf4j,这次又遇到一样的问题,不能坐视不管了,因为我必须要用到邮件发送. 百度各种信息,终于被我找到了... 解决步骤如下: 一.添加mail依赖,报错Missing artifact org.springframework.boot:spring-boot-starter-mail

导入项目的时候报错Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha7

问题描述 今天在导入项目的时候报错: Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha7. 原因是:没有下载相应版本的ConstraintLayout. 解决方案 工具栏上选择 Tools --> Android -->SDK Manager 切换到SDK Tools选项,在右下角处勾选 Show Package Details 在Support Repository下的Const

MyEclipse中jsp的注释报错解决

jsp页面中注释报错: 出错现场:在eclipse中没有报错,在MyEclipse中报错. <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. --> Myeclipse的js中不会识别这样的标识 需要改成: //  To use express install, set to playerProductInstall.swf, otherwise the empty

Android Studio添加依赖编译报错

Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (3.0.1) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details. 原因:由于添加的依赖版本是最新的,而代码仓库里边并没有最新的依赖导致报错 解决办法:在build.gradl

目标平台、活动平台 配置,出现未能加载文件或程序集“xxx”或它的某一个依赖项报错

今天在做动态加载程序集的时候,发现明明程序集存在的情况下,还是依然报“未能加载文件或程序集“xxx”或它的某一个依赖项报错”的错误,排除了程序和配置的错误后,怀疑是否是环境的问题,于是百度加msdn后,终于找打答案,这里记录下,避免以后其他人也遇到 如果你将应用程序生成x86而不是Any CPU时,在64位操作系统中不会出错错误,而在32位操作系统中可能会出现以下错误 “/xxxxx”应用程序中的服务器错误. -------------------------------------------

Android Studio导入Fresco项目编译报错unable to expand TAR &#39;imagepipeline\build\downloads\libjpeg-turbo-1.3.1.tar.gz&#39;解决

把github上的一个Fresco的demo源码clone到本地(附clone地址:https://github.com/facebook/fresco.git),导入这个fresco项目编译报了如题所示的错.经过网上搜索解决方案,只找到了下面链接给的解决方案: unable to expand TAR 'imagepipeline\build\downloads\libjpeg-turbo-1.3.1.tar.gz解决 按照上面链接给的方法试了一下,结果无法解决.还是报同样的错误.然后我试着去

利用python将文本文件导入数据库时,报错:Duplicate entry &#39;...&#39; for key &#39;PRIMARY&#39;

错误原因就是添加了相同的主键,我想了好一会儿,我抓的数据主键是Isbn啊,不可能重的啊,于是,我去数据库中查了以下报错的isbn号,插入的数据中也有,因为分类不一样,所以要再插入一次,这就肯定会报错啦,其中一个处理方法就是, 如果数据库中有这条记录,那么就跳过这条记录,另外,还可以在跳过这条记录的同时,把数据库中这本书的类别改为这两种类别. ans = con.execute("select * from b where isbn=(%s)",isbn)if (ans): contin

刚新建好的动态网站项目,创建jsp页面就报错

拿到刚刚可以运行的Eclipse,就马上想敲码了,但一创建项目之后再创建jsp页面就报错= =! 报错的内容大概为缺乏对应的jar包. 我们常用Tomcat为中间体,而他本身是带有开发jsp网站的对应的jar包,检查在创建的时候是否有在Eclipse中配置Tomcat和新建项目的时候,有没把配置好的Tomcat设置选择,而我是没有选择在Eclipse中配置好的Tomcat. 首先第一步,选中 项目 –> Properties 在Java Build Path 下,点击 Add Library..

eclispe集成Scalas环境后,导入外部Spark包报错:object apache is not a member of package org

在Eclipse中集成scala环境后,发现导入的Spark包报错,提示是:object apache is not a member of package org,网上说了一大推,其实问题很简单: 解决办法:在创建scala工程是,到了创建包的这一步是我们要选择: 而不是创建java工程是的Java程序的包类型:然后创建scala类的时候也是一样,注意选择是scala class而不是java class. 这样创建的项目,我们在将外部包,build path进来后,发现不再报错. 原文地址: