Setting a default format for Java 8 Date types

https://www.baeldung.com/spring-boot-formatting-json-dates https://stackoverflow.com/questions/66694406/spring-boot-rest-offsetdatetime-returned-as-float

March 24, 2022 · 2 words · Peter Dieleman

Using ModelMapper for a Count Field

Baeldung GameDTO contains only two fields, but the field types and names perfectly match the source. In such a case, ModelMapper handles the conversion without additional configuration: https://www.baeldung.com/java-modelmapper Use a converter, as outlined above.

March 24, 2022 · 34 words · Peter Dieleman

Debugging Spring Security AAD

Disabling Spring Security https://github.com/Azure/azure-sdk-for-java/pull/12645/files

March 23, 2022 · 4 words · Peter Dieleman

PostgreSQL & Spring Boot Dates

Notes The SQL standard requires that writing just timestamp be equivalent to timestamp without time zone, and PostgreSQL honors that behavior. timestamptz is accepted as an abbreviation for timestamp with time zone; this is a PostgreSQL extension. Precision can be specified for time, timestamp, and interval types, and can range from 0 to 6. If no precision is specified in a constant specification, it defaults to the precision of the literal value (but not more than 6 digits)....

February 18, 2022 · 216 words · Peter Dieleman

Hibernate Envers

Blog Posts / Documentation https://docs.jboss.org/envers/docs/ https://vladmihalcea.com/the-best-way-to-implement-an-audit-log-using-hibernate-envers/ https://thorben-janssen.com/hibernate-envers-getting-started/ https://sunitc.dev/2020/01/21/spring-boot-how-to-add-jpa-hibernate-envers-auditing/ https://www.bytefish.de/blog/hibernate_envers_versioning_and_auditing.html https://hibernate.atlassian.net/browse/HHH-10212?attachmentOrder=asc https://developer.jboss.org/thread/152642 https://developer.jboss.org/thread/166705 https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/developing_hibernate_applications/hibernate_envers Further Issues @CreatedDate, @CreatedBy, etc. Annotations https://www.baeldung.com/database-auditing-jpa https://rashidi.github.io/spring-boot-data-audit/ @CreatedDate, @CreatedBy, @LastModifiedDate, and @LastModifiedBy. createdBy and modifiedBy fields will be automatically populated if Spring Security is available in the project path. @CreatedDate & @LastModifiedDate https://stackoverflow.com/questions/49170180/createdby-and-lastmodifieddate-are-no-longer-working-with-zoneddatetime https://stackoverflow.com/questions/43236431/register-a-new-date-converter-auditable-in-spring-data-mongodb-for-zoneddatetime https://stackoverflow.com/questions/49170180/createdby-and-lastmodifieddate-are-no-longer-working-with-zoneddatetime java.lang.IllegalArgumentException: Invalid date type for member <MEMBER NAME>! Supported types are [org.joda.time.DateTime, org.joda.time.LocalDateTime, java.util.Date, java.lang.Long, long]. https://github.com/spring-projects/spring-data-commons/issues/880 Which finally contains this amazing quote:...

January 1, 2022 · 188 words · Peter Dieleman

Ignoring Unrecognised fields

https://stackoverflow.com/questions/4486787/jackson-with-json-unrecognized-field-not-marked-as-ignorable @JsonIgnoreProperties(ignoreUnknown = true)

August 4, 2020 · 4 words · Peter Dieleman