reverse engineering in hibernate using spring
问题 Hibernate can be used to generate all DAO's and hibernate properties files using reverse engineering. But the DAO code it generates is not appropriate in terms of spring dependency injection. So, how can we use hibernate reverse engineering technique to generate spring beans based on principle of dependency injection? 回答1: You should use a generic DAO, where you only need to create a Subclass that specify the entity class. Or a more modern approach like Spring Data JPA or its predecessor