zoukankan      html  css  js  c++  java
  • SpringBoot thymeleaf th:src @PathVariable参数

    SpringBoot thymeleaf th:src @PathVariable参数

    ================================

    ©Copyright 蕃薯耀 2021-12-22

    https://www.cnblogs.com/fanshuyao/

    SpringBoot thymeleaf th:src @PathVariable参数传递,正确写法

    <img alt="二维码" 
      width="250px" height="250px"
      th:src="@{/warehouse/goods/getQrcode/{id}(id=${objDB?.id})}">

    {id}对应括号中的id参数

    语法真的很无语::>_<::

    后台接收:

    @GetMapping("/getQrcode/{id}")
        public void getQrcode(HttpServletRequest request, HttpServletResponse response, 
                @PathVariable(value="id") Long id) {
            
        }

    ================================

    ©Copyright 蕃薯耀 2021-12-22

    https://www.cnblogs.com/fanshuyao/

    今天越懒,明天要做的事越多。
  • 相关阅读:
    广搜 BFS()
    最短路-A
    DFS-C
    codeforces contest
    小技巧
    将博客搬至CSDN
    建树
    codeforces gym102411 Equidistant(图论+乱搞)
    codeforces 1250N wires(简单图论)
    Splay 树
  • 原文地址:https://www.cnblogs.com/fanshuyao/p/15718551.html
Copyright © 2011-2022 走看看