Skip to content
Advertisement

Tag: freemarker

FreeMarker configuration conflict (Spring Boot)

I have a FreeMarker configuration: And dependencies from build.gradle: It works okay. But when I set following dependency in build.gradle: implementation ‘org.springframework.boot:spring-boot-starter-data-rest’ I’ll get an error: Seems like spring-data-rest provides configured FreeMarker too and conflict happens. @Primary and @Qualifier don’t work. What can I do? [UPDATE] Tried to add exclude to my main class: Now application can start, but FreeMarker

SQLException: Column not found

My sql query should take all the fields from the table and transfer them to the FTL page using the UserMapper template. The template indicates which object to create and to which fields of the object which table columns to match. In summary: all the fields work correctly, but the seanceNumber field gives the error “Column ‘seanceNumber’ not found”. This

Unwanted quotes in substituted freemarker template fields

I’m generating contents out of a Freemarker template but I get quoted values in my substituted fields. For JSON object In template: I get While I want The Object I feed it with is a JsonNode-tree obtained by Mapping my object with Jackson annotations: Processor: I have the feeling I’m missing some kind of configuration? Answer FreeMarker doesn’t add the

Feemarker writing images to html

is there anyway to write image in freemarker instead of giving link as <img src=”${pathToPortalImage} Note : cant we use otputstream or something in freemarker ? Answer You can embed the image as base64 directly inside the html img tag. To convert an image to base 64 you can use Apache Commons (codec). Here is a solution using Apache Commons

Advertisement