Show image with variable name Thymeleaf Spring Boot

Show image with variable name Thymeleaf Spring Boot

Brandan Jones

3 года назад

12,740 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@murloteg
@murloteg - 29.07.2023 12:20

This video about saving files on file system (in db we saving only file name and file path).
Thank you, author! It's very helpful

Ответить
@mstam853
@mstam853 - 03.04.2021 16:54

Thank you so much for making & sharing this playlist, awesome stuff! There are a few things that are still a bit confusing to me. In a real-world application, would we be uploading to cloud our spring boot app, database (photo meta data) and photos, separately? Is there a use case when we would want to have photos in our project folder? Let's say we are building a social media app and want to view a profile photo we just saved. How would that work, on a high level? Would we need to look up the photo from the cloud (via some URI) in our spring boot app? Thanks!

Ответить
@user-pz6qo1io7p
@user-pz6qo1io7p - 05.01.2021 08:42

Oh, i tried it in this way, but i'm getting the exception... Thymeleaf is trying to parse in my relative path to image? Could you give me a hint, please, what can be wrong with this exception? (I have no "/photo/" path, just "/static/") Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NumberFormatException: For input string: "0.jpg"] with root cause

Ответить