Sample of using Hibernate Annotations by reducing XML configuration files thus making it simpler to define required metadata directly into our Java code. When using annotations, we no longer need the additional mapping file (*.hbm.xml). The metadata for the ORM is specified in the individual classes.
An Example explaining on how @Required annotation from Spring Framework works. Provides sample on how to use @Required and expected exception if beans are not properly configured like BeanInitializationException or Property is required for bean.