================================
©Copyright 蕃薯耀 2021-12-15
SpringBoot thymeleaf th:src @PathVariable参数传递,正确写法
<img alt="二维码"
width="250px" height="250px"
th:src="@{/warehouse/goods/getQrcode/{id}(id=${objDB?.id})}">
后台接收:
@GetMapping("/getQrcode/{id}")
public void getQrcode(HttpServletRequest request, HttpServletResponse response,
@PathVariable(value="id") Long id) {
}
{id}对应括号中的id参数
语法真的很无语::>_<::
(时间宝贵,分享不易,捐赠回馈,^_^)
================================
©Copyright 蕃薯耀 2021-12-15