4. SpringBoot中集成jsp展示

时间:2020-10-23 20:45:40   收藏:0   阅读:30
<!-- 引入jstl标签,配套jsp使用,可以不导入 -->
<dependency>
  <groupId>jstl</groupId>
  <artifactId>jstl</artifactId>
  <version>1.2</version>
</dependency>


<!-- 配置内嵌的tomcat解析jsp -->
<dependency>
  <groupId>org.apache.tomcat.embed</groupId>
  <artifactId>tomcat-embed-jasper</artifactId>
</dependency>
spring:
  profiles:
    # Activate test configuration
    active: dev
  mvc:
    view:
      # Configure prefix
      prefix: /
      # Configure suffix
      suffix: .jsp
@Controller
@RequestMapping("user")
public class UserController {

    @RequestMapping("findAll")
    public String findAll() {
        System.out.println("findAll");
        return "index";
    }
}

原文:https://www.cnblogs.com/Lunix-touch/p/13865898.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!