SpringBoot thymeleaf th:src @PathVariable参数

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

©Copyright 蕃薯耀 2021-12-15

​​​​​蕃薯耀的博客_CSDN博客

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

​​​​​蕃薯耀的博客_CSDN博客


版权声明:本文为w995223851原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。