Skip to content

Tag: spring-boot

Maven: library module

I’m working on a project with a library module that has about 10 submodules. For the application project the developer asked us to find a way so that they can import only one dependency, instead of the requested 10. Let’s use as an example the dependency of log4j: I need only to include one not al…

Mapstruct how to initialize fields

I have a DTO like this and an entity I want to create a mapper to map DTO to entity. How can I make the field private Instant timestamp; has value like Instant.now()? My mapper so far It got compile error Answer The issue is due to the source being empty. Remove the source and use expression instead of defaul…