August 2017
Beginner to intermediate
370 pages
8h 37m
English
First and foremost, one will be required to configure bean definitions in order to inject a SessionFactory instance as a member variable in DAOs. In order to configure bean definitions, it is recommended to have a class annotated with @Configuration annotation. The following is the code that represents class for configurating bean definitions:
@Configuration @EntityScan("com.book.healthapp.domain") @EnableTransactionManagement @PropertySource("classpath:application.properties") public class AppConfig { ... }
Pay attention to some of the following in the earlier given code:
Read now
Unlock full access