mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add logging initializer to tests
This commit is contained in:
parent
6bb628adb4
commit
bfb843e1a0
@ -18,19 +18,22 @@ package org.springframework.boot.sample.data.jpa;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer;
|
||||
import org.springframework.boot.context.initializer.LoggingApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
/**
|
||||
* Base class for integration tests. Mimics the behavior of
|
||||
* Base class for integration tests. Mimics the behaviour of
|
||||
* {@link SpringApplication#run(String...)}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
@ContextConfiguration(classes = SampleDataJpaApplication.class, initializers = ConfigFileApplicationContextInitializer.class)
|
||||
@ContextConfiguration(classes = SampleDataJpaApplication.class, initializers = {
|
||||
ConfigFileApplicationContextInitializer.class,
|
||||
LoggingApplicationContextInitializer.class })
|
||||
public abstract class AbstractIntegrationTests {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user