File tree Expand file tree Collapse file tree
main/java/org/baeldung/config
test/java/org/baeldung/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818import org .springframework .transaction .annotation .EnableTransactionManagement ;
1919
2020@ Configuration
21- @ EnableJpaRepositories (basePackages = { "org.baeldung.repository" , "org.baeldung.boot.repository" })
21+ @ EnableJpaRepositories (basePackages = { "org.baeldung.repository" , "org.baeldung.boot.repository" , "org.baeldung.boot.boottest" })
2222@ PropertySource ("classpath:persistence-generic-entity.properties" )
2323@ EnableTransactionManagement
2424public class H2JpaConfig {
@@ -41,7 +41,7 @@ public DataSource dataSource() {
4141 public LocalContainerEntityManagerFactoryBean entityManagerFactory () {
4242 final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean ();
4343 em .setDataSource (dataSource ());
44- em .setPackagesToScan (new String [] { "org.baeldung.domain" , "org.baeldung.boot.model" });
44+ em .setPackagesToScan (new String [] { "org.baeldung.domain" , "org.baeldung.boot.model" , "org.baeldung.boot.boottest" });
4545 em .setJpaVendorAdapter (new HibernateJpaVendorAdapter ());
4646 em .setJpaProperties (additionalProperties ());
4747 return em ;
Original file line number Diff line number Diff line change 1818import org .springframework .transaction .annotation .EnableTransactionManagement ;
1919
2020@ Configuration
21- @ EnableJpaRepositories (basePackages = { "org.baeldung.repository" , "org.baeldung.boot.repository" })
21+ @ EnableJpaRepositories (basePackages = { "org.baeldung.repository" , "org.baeldung.boot.repository" , "org.baeldung.boot.boottest" })
2222@ EnableTransactionManagement
2323public class H2TestProfileJPAConfig {
2424
@@ -41,7 +41,7 @@ public DataSource dataSource() {
4141 public LocalContainerEntityManagerFactoryBean entityManagerFactory () {
4242 final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean ();
4343 em .setDataSource (dataSource ());
44- em .setPackagesToScan (new String [] { "org.baeldung.domain" , "org.baeldung.boot.model" });
44+ em .setPackagesToScan (new String [] { "org.baeldung.domain" , "org.baeldung.boot.model" , "org.baeldung.boot.boottest" });
4545 em .setJpaVendorAdapter (new HibernateJpaVendorAdapter ());
4646 em .setJpaProperties (additionalProperties ());
4747 return em ;
You can’t perform that action at this time.
0 commit comments