weblog

技術的なメモ置き場。

2018-10-21から1日間の記事一覧

Imgタグに表示する画像をByte配列で返す

Kotlin Spring Boot 2.0.4 Thymeleaf Spring Bootで、Imgタグに表示する画像をByte配列を返すには、ResponseEntityを使用する。 Controllerの実装 @GetMapping("image") fun image(): ResponseEntity<ByteArray> { val bytes = .. // 画像のByte配列を取得 return Respo</bytearray>…