spring boot(五) 整合JSP

一、jsp整合问题(参考https://blog.csdn.net/news_out/article/details/87863295

背景:springboot2.0.5整合jsp

依赖如下,在父工程下建造SpringBoot-JSP子工程

<parent>
        <artifactId>SpringBoot_Parent</artifactId>
        <groupId>com.qingfeng</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>SpringBoot-JSP</artifactId>
    <packaging>war</packaging>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!--整合jsp需要的依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>
    </dependencies>

 

整合之后一直出现如图所示的内容

在确定启动正常,访问路径正常,配置文件配置了视图映射路径后,最终解决方案为:

进入编辑配置选择对应的项目启动项(例为ApplicationContext),选择对应的工作目录,点击apply、ok就行

 

转载于:https://www.cnblogs.com/ffzzcommsoft/p/11251924.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值