zoukankan      html  css  js  c++  java
  • springboot整合JSP

    引入jsp继承依赖

    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    <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>

    2.配置视图解析器

      #在配置文件中引入视图解析器

    #在配置文件中引入视图解析器
    spring:
    mvc:
     view:
      prefix: / 
      suffix: .jsp插件
    

     3.插件方式启动

    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
    </plugins>
    
  • 相关阅读:
    初识SpringBoot
    Dubbo案例SSM整合
    Dubbo
    Spring错题整合
    SSM整合
    SpringMVC数据校验
    SpringMVC拦截器
    SpringMVC文件上传
    SpringMVC异常
    字符串
  • 原文地址:https://www.cnblogs.com/ljy9/p/14173030.html
Copyright © 2011-2022 走看看