mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-12 13:01:10 +00:00
#164 Disable cache configuration for unit tests
This commit is contained in:
parent
e9f5f7b541
commit
4da41dbbda
7 changed files with 24 additions and 1 deletions
|
|
@ -45,7 +45,6 @@ import org.springframework.web.servlet.view.xml.MarshallingView;
|
|||
*/
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@EnableCaching
|
||||
@ComponentScan
|
||||
public class PetClinicApplication extends SpringBootServletInitializer {
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue