Skip to content

Commit 0af476d

Browse files
yasin3061pivovarit
authored andcommitted
BAEL-88 Integration tests fixed. (eugenp#1739)
* BAEL-88 Testing in Spring Boot * BAEL-88 Integration tests fixed.
1 parent 722ce8f commit 0af476d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎spring-boot/src/main/java/org/baeldung/config/H2JpaConfig.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import 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
2424
public 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;

‎spring-boot/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import 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
2323
public 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;

0 commit comments

Comments
 (0)