In the above codes we add @EnableTransactionManagement(mode = AdviceMode.ASPECTJ) to enable transaction management and use AspectJ to weave transaction aspect into your business logic.
And @EnableJpaAuditing(auditorAwareRef = "auditor") enables the simple auditing features provided in Spring Data JPA. It requires a AuditorAware bean.
@EntityScan(basePackageClasses = {User.class, Jsr310JpaConverters.class}) add the JPA entity scan scope, Java 8 DateTime support is added in Spring Data JPA via JPA 2.1 AttributeConvertor feature.