// 重定向到新的jsp页面
return "redirect:/index.jsp"; // 请求转发到新的jsp页面
return "forward:/index.jsp";

两种方式取消前后缀:如上图-请求转发和重定向。

前后缀配置: 在application.yml中配置:

spring:
mvc:
view:
prefix: /WEB-INF/views
suffix: .jsp

SpringBoot或者SpringMVC 临时取消配置的视图页面的前后缀的更多相关文章

  1. java框架之SpringBoot(5)-SpringMVC的自动配置

    本篇文章内容详细可参考官方文档第 29 节. SpringMVC介绍 SpringBoot 非常适合 Web 应用程序开发.可以使用嵌入式 Tomcat,Jetty,Undertow 或 Netty ...

  2. SpringBoot中SpringMVC的自动配置以及扩展

    一.问题引入 我们在SSM中使用SpringMVC的时候,需要由我们自己写SpringMVC的配置文件,需要用到什么就要自己配什么,配置起来也特别的麻烦.我们使用SpringBoot的时候没有进行配置 ...

  3. Springboot中SpringMvc拦截器配置与应用(实战)

    一.什么是拦截器,及其作用 拦截器(Interceptor): 用于在某个方法被访问之前进行拦截,然后在方法执行之前或之后加入某些操作,其实就是AOP的一种实现策略.它通过动态拦截Action调用的对 ...

  4. Springboot对SpringMVC如何扩展配置

    原文地址:http://www.javayihao.top/detail/171 概述 Springboot在web层的开发基本都是采用Springmvc框架技术,但是Springmvc中的某些配置在 ...

  5. SpringMVC的基础配置及视图定位

    概要 记录一下搭建SpringMVC框架的步骤 视图定位也就是改变jsp在项目中的路径 一.新建javaweb项目springmvc1,在lib中导入jar包 此项目上传了GitHub,方便去下载ja ...

  6. SpringBoot中对SpringMVC的自动配置

    https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#boot-features-developin ...

  7. 7、springmvc的自动配置

    1.springmvc的自动配置 文档:https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#boot ...

  8. SpringBoot接管SpringMvc

    SpringBoot接管SpringMvc Spring Web MVC framework(通常简称为“Spring MVC”)是一个丰富的“model 视图控制器”web framework. S ...

  9. SpringMVC的自动配置解析

    https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#boot-features-developin ...

随机推荐

  1. spring相关知识点易错

    1.spring不支持静态变量注入,即不能再static变量上面加@Resoure 要是想注入的话就用set方法注入 private static ComboPooledDataSource pool ...

  2. 常用exporter下载

    1.node_exporter https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter- ...

  3. 动态拼接tr,th

    var dltable=''; // <c:forEach items="data" var="data" ></c:forEach> ...

  4. elasticsearch head插件(5.0及以上版本)

    官方参考地址:https://github.com/mobz/elasticsearch-head5.0及以上版本安装参考地址:http://www.cnblogs.com/jstarseven/p/ ...

  5. 安装APK时报错:Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

    安装APK时报错:Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI] 可以使用adb install -t 解决 对于已经在手机的文件可以使用pm ...

  6. springmvc配置jackson时遇到的一些问题

    在没接触springmvc之前我们在servlet中想返回前台json数据时,都是自定义一个JSONObject和JSONArray,然后调用response.getWriter()对象的方法返回js ...

  7. rc.local 注意事項,call python script, file position

    如果要在 rc.local 呼叫 python script python script 的位置需使用絕對路徑 其 python script 裡的有關 file 的位置也需使用 絕對路徑 如果要在 ...

  8. SPSS python教程:[1]安装Python Essentials

    python机器学习-乳腺癌细胞挖掘(博主亲自录制视频)https://study.163.com/course/introduction.htm?courseId=1005269003&ut ...

  9. [go]gin框架

    gin参考 Gin框架返回值 // 返回json func main() { r := gin.Default() //方法一: 自己拼接json // gin.H is a shortcut for ...

  10. mysql一条语句实现插入或更新的操作

    ,),(,) ON DUPLICATE KEY UPDATE c=VALUES(c); 或者 INSERT INTO table (id,a,b,c) select id,a,b,c from xxx ...