Gives a persistent and human-readable
type name for Entity or ValueObject.
This name is used everywhere by JaVers, instead of a fragile, fully-qualified class name.
Naming types is
recommended if you are
using
JaversRepository
.
It fosters refactoring of package names and class names.
Usage example:
@Entity
@TypeName("Person")
class Person {
@Id
private int id;
private String name;
}
@TypeName works similarly to
org.springframework.data.annotation.TypeAlias
in Spring Data.
Important
All classes with @TypeName should be registered using
JaversBuilder.withPackagesToScan(String)
or
javers.packagesToScan
Spring Boot starter property.