Add spring-test annotations to auto imports
This commit is contained in:
parent
27b31acd05
commit
05d1a104e4
|
|
@ -66,6 +66,7 @@ public class SpringTestCompilerAutoConfiguration extends
|
||||||
imports.addStarImports("org.junit.runner")
|
imports.addStarImports("org.junit.runner")
|
||||||
.addStarImports("org.springframework.boot.test")
|
.addStarImports("org.springframework.boot.test")
|
||||||
.addStarImports("org.springframework.test.context.junit4")
|
.addStarImports("org.springframework.test.context.junit4")
|
||||||
|
.addStarImports("org.springframework.test.annotation")
|
||||||
.addImports(
|
.addImports(
|
||||||
"org.springframework.test.context.web.WebAppConfiguration");
|
"org.springframework.test.context.web.WebAppConfiguration");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
@SpringApplicationConfiguration(classes=Application)
|
@SpringApplicationConfiguration(classes=Application)
|
||||||
@IntegrationTest('server.port:0')
|
@IntegrationTest('server.port:0')
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
@DirtiesContext
|
||||||
class RestTests {
|
class RestTests {
|
||||||
|
|
||||||
@Value('${local.server.port}')
|
@Value('${local.server.port}')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue