From 0ff976ef779b2d931cd8c68e0e678c3488248932 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Sat, 24 Aug 2019 14:45:17 +0530 Subject: [PATCH] BAEL-16326 Week 34 | go through the integration test results and see what NEW failing tests we have (#7641) - fixing newly failing integration tests --- .../spring/data/persistence/config/PersistenceConfig.java | 2 +- .../src/main/java/com/baeldung/config/MvcConfig.java | 3 +-- .../BazzNewMappingsExampleIntegrationTest.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename spring-rest-simple/src/test/java/com/baeldung/{web/test => requestmapping}/BazzNewMappingsExampleIntegrationTest.java (98%) diff --git a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java index 717b9c3aa0..66b540a692 100644 --- a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java +++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java @@ -26,7 +26,7 @@ import com.google.common.base.Preconditions; @PropertySource({ "classpath:persistence-${envTarget:h2}.properties" }) @ComponentScan({ "com.baeldung.spring.data.persistence" }) // @ImportResource("classpath*:springDataPersistenceConfig.xml") -@EnableJpaRepositories(basePackages = "com.baeldung.spring.data.persistence.dao") +@EnableJpaRepositories(basePackages = { "com.baeldung.spring.data.persistence.dao", "com.baeldung.spring.data.persistence.jpaquery" }) public class PersistenceConfig { @Autowired diff --git a/spring-rest-simple/src/main/java/com/baeldung/config/MvcConfig.java b/spring-rest-simple/src/main/java/com/baeldung/config/MvcConfig.java index d169f7e9d4..48b627a344 100644 --- a/spring-rest-simple/src/main/java/com/baeldung/config/MvcConfig.java +++ b/spring-rest-simple/src/main/java/com/baeldung/config/MvcConfig.java @@ -26,7 +26,7 @@ import java.util.List; */ @Configuration @EnableWebMvc -@ComponentScan({ "com.baeldung.web" }) +@ComponentScan({ "com.baeldung.web", "com.baeldung.requestmapping" }) public class MvcConfig implements WebMvcConfigurer { public MvcConfig() { @@ -66,7 +66,6 @@ public class MvcConfig implements WebMvcConfigurer { public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { configurer.defaultContentType(MediaType.APPLICATION_JSON); } - @Override public void addCorsMappings(CorsRegistry registry) { diff --git a/spring-rest-simple/src/test/java/com/baeldung/web/test/BazzNewMappingsExampleIntegrationTest.java b/spring-rest-simple/src/test/java/com/baeldung/requestmapping/BazzNewMappingsExampleIntegrationTest.java similarity index 98% rename from spring-rest-simple/src/test/java/com/baeldung/web/test/BazzNewMappingsExampleIntegrationTest.java rename to spring-rest-simple/src/test/java/com/baeldung/requestmapping/BazzNewMappingsExampleIntegrationTest.java index 4f0395e914..a6039b54c7 100644 --- a/spring-rest-simple/src/test/java/com/baeldung/web/test/BazzNewMappingsExampleIntegrationTest.java +++ b/spring-rest-simple/src/test/java/com/baeldung/requestmapping/BazzNewMappingsExampleIntegrationTest.java @@ -1,5 +1,5 @@ -package com.baeldung.web.test; +package com.baeldung.requestmapping; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is;