Java Image base64 to Spring Boot MultipartFile

54 Leave a Comment
Java code: package com.awaimai; import cn.hutool.core.lang.Assert; import lombok.extern.slf4j.Slf4j; import org.apache.tika.mime.MimeTypeException; import org.apache.tika.mime.MimeTypes; import org.springframework.mock.web.MockMultipartFile; import org.springframework.web.multipart.MultipartFile; import java.ut…

Spring Boot + Thymeleaf form validation error not displaying

911 Leave a Comment
Check these by these steps. Make sure BindingResult just follows up with the object variable @PostMapping("/save") public String save(@Valid Product product, BindingResult bindingResult, RedirectAttributes attributes) { // th:object = "${product}" } Here, it follows up producrt object. use @…