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/
今天越懒,明天要做的事越多。