Advertisement

springBoot 从数据库中显示图片流

阅读量:

HTML

复制代码
 <img alt="image"  th:src="'createFolw?photoId='+${photoId}+'&width=540&height=320'" >

    
 现在了解到这能以这种方式来设置图片大小
    
    
    
    

控制器

复制代码
 @RequestMapping("createFolw")

    
 	public void createFolw(HttpServletRequest request, HttpServletResponse response)throws Exception  {
    
 		Long photoId=RequestUtil.getLong(request,"photoId",0L);
    
 		int width = RequestUtil.getInt(request, "width");
    
 		int height = RequestUtil.getInt(request, "height");
    
 		UpPhoto photoInfo = upPhotoService.getById(photoId);
    
 		HttpSession seesion = request.getSession();
    

全部评论 (0)

还没有任何评论哟~