#164 Disable cache configuration for unit tests

This commit is contained in:
Antoine Rey 2016-06-24 21:18:38 +02:00
parent e9f5f7b541
commit 4da41dbbda
7 changed files with 24 additions and 1 deletions

View file

@ -45,7 +45,6 @@ import org.springframework.web.servlet.view.xml.MarshallingView;
*/
@Configuration
@EnableAutoConfiguration
@EnableCaching
@ComponentScan
public class PetClinicApplication extends SpringBootServletInitializer {

View file

@ -0,0 +1,14 @@
package org.springframework.samples.petclinic.config;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* Cache could be disable in unit test.
*/
@Configuration
@EnableCaching
@Profile("production")
public class CacheConfig {
}