The meaning of life is to explore the world

Updated email template and fixed a bug causing error to save special to DB

Posted on By Jason Liu

What have been done:

  1. Updated email html template from Oscar.
  2. Fixed the exception where Clock used in Special class cannot be saved into MongoDB.

Problems encountered:

  1. Exception triggered while saving Special class to DB: “Can’t find a codec for class java.time.Clock$SystemClock.”.

Solution:

  1. Use the annotation @Transient on the Clock property to prevent Spring Framework mapping
  2. Use the annotation @Builder on an empty contructor to prevent Lombok automatic mapping. Refer to link below:
    https://stackoverflow.com/questions/30717640/how-to-exclude-property-from-lombok-builder