不同之处已做高亮。

jsp 写法:

<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.2.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/login.css"></link>
<script type="text/javascript">
   $.ajax({
 url : '${pageContext.request.contextPath }/syslogin/login'
    )} </script>

spring boot thymeleaf 写法:

<script type="text/javascript" th:src="@{/js/jquery-3.2.0.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/css/login.css}">
<script type="text/javascript">
   $.ajax({
 url : '[[@{/syslogin/login}]]'
)}
</script>

  

spring boot 页面根路径获取和jsp获取的不同之处(粘贴即用)的更多相关文章

  1. 【spring boot】5.spring boot 创建web项目并使用jsp作前台页面

    贼烦的是,使用spring boot 创建web项目,然后我再idea下创建的,but 仅仅启动spring boot的启动类,就算整个项目都是好着的,就算是能够进入controller中,也不能成功 ...

  2. spring boot 中的路径映射

    在spring boot中集成thymeleaf后,我们知道thymeleaf的默认的html的路径为classpath:/templates也就是resources/templates,那如何访问这 ...

  3. spring boot 配置静态路径

    一  前言 最近有个项目,需要上传一个zip文件(zip文件就是一堆的html压缩组成)的压缩文件,然后后端解压出来,用户可以预览上传好的文件. 查看资料,spring boot对静态文件,可以通过配 ...

  4. Spring Boot项目跳转不到jsp页面是怎么回事

    SpringBoot访问不了JSP但却能进入后台 一直报错: 解决方法: 改成下面的

  5. spring boot 创建web项目并使用jsp作前台页面

    参考链接:https://www.cnblogs.com/sxdcgaq8080/p/7712874.html

  6. spring boot 自定义视图路径

    boot 自定义访问视图路径 . 配置文件 目录结构 启动类: html页面 访问: 覆盖boot默认路径引用. 如果没有重新配置,则在pom引用模板. 修改配置文件. 注意一定要编译工程

  7. spring boot 框架根據 sql 創建語句自動生成 MVC層類代碼

    GITHUB: https://github.com/lin1270/spring_boot_sql2code 會自動生成model.mapper.service.controller. 代碼使用No ...

  8. Spring Boot下使用JSP页面

    一.创建webapp目录 在src/main下创建webapp目录,用于存放jsp文件.这就是一个普通的目录,无需执行Mark Directory As 二.创建jsp 1.指定web资源目录 在sp ...

  9. java项目获取根路径(web项目和application项目的区分)

    Java项目中经常要读取配置文件,涉及到读取配置文件的地方,就会要读定位文件的路径.因此,在项目如何正确获取文件路径尤为关键. 根据不同的java项目,在获取文件路径时候有一些 小区别 测试环境:E: ...

随机推荐

  1. c# 钩子类

    using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...

  2. emWin智能家居主界面设计,含uCOS-III和FreeRTOS两个版本

    第6期:智能家居主界面设计配套例子:V6-910_STemWin提高篇实验_智能家居主界面设计(uCOS-III)V6-911_STemWin提高篇实验_智能家居主界面设计(FreeRTOS) 例程下 ...

  3. 【安富莱二代示波器教程】第18章 附件C---波形拟合

    完整教程下载地址:http://forum.armfly.com/forum.php?mod=viewthread&tid=45785 第18章      附件C---波形拟合 emWin5. ...

  4. Shiro在SSM框架中的应用

    上一篇Shiro基础的连接 如果想使用Relam的操作,那么必须要保证有一个具体的认证类实现了Relam接口 web.xml增加shiro的配置 <!-- 进行shiro的过滤器的配置 --&g ...

  5. [Swift]LeetCode479. 最大回文数乘积 | Largest Palindrome Product

    Find the largest palindrome made from the product of two n-digit numbers. Since the result could be ...

  6. [Swift]LeetCode825. 适龄的朋友 | Friends Of Appropriate Ages

    Some people will make friend requests. The list of their ages is given and ages[i] is the age of the ...

  7. 一文掌握 Linux 性能分析之网络篇(续)

    本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. 这是 Linu ...

  8. 【转】linux防火墙配置

    开启80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent 出现success表明添加成功 命令含义: --zone #作用域 -- ...

  9. 根据地址查询经纬度Js

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>根据地址查询经纬度</ ...

  10. 利用jmap和MAT等工具查看JVM运行时堆内存

    jmap JDK自带了一些工具可以帮助我们查看JVM运行的堆内存情况,常用的是jmap命令 jmap -heap <pid> 打印堆的使用情况 那么,从这个输出中我们也可以大致看出堆的结构 ...