Closed ciis0 closed 4 months ago
Many thanks for your detailed investigations and the suggested fix.
I slightly reworked your PR to prevent creating an additional sample module. The scenario has been integrated in Sample1.
The suggested fix looks good to me. Even if the setBooleanFormat
is recommended by the Freemarker documentation to be left empty, it is quite reasonable to define it for the intended usage of this library .
Regarding your other comments/remarks:
html
and pdf
at some point.application.yaml
to the list of default files that are looked up. It should now be taken into account without any additional configuration change on your side.If the changes performed on develop
are fine for you, I will release a new version ASAP.
Again, many thanks for your input.
LGTM!
I am thinking about whether "Boolean value without any default value" doc comment could be confusing (because it does have an implicit default value, false
).
As the problem was with the type (actual Boolean, not String), maybe rather "Boolean value with native default"?
integrated with some modifications in develop.
oops, that close should have been the PR, not the issue... ^^
On which OS are you working ?
I am working in Ubuntu WSL.
I changed the Javadoc into: Boolean value without any explicit default value
.
The fix is released and is available in version 0.2.1
:
https://central.sonatype.com/artifact/com.github.egoettelmann/spring-value-annotation-processor
first, thank for this project!
in certain constellations, I am running into problems with
boolean
values during (html) report generation using the Maven plugin:using default html report template
@ConfigurationProperties class with a boolean
import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties("app") @Getter @Setter public class ConfigPropsBoolWithDataProblem { boolean bool; }
value not set via
application.{yml,properties}
(or setting viaapplication.yaml
instead of.yml
)In that case then the aggregation seems to store the default value obtained from Java in metadata JSON as a actual boolean and then report generation fails with the error below.
A workaround is to declare default value in
application.yml
(not.yaml
!) orapplication.properties
, then it's stored as string in metadata and FreeMarker is happy.I am open to look into providing a fix PR. :)