
Given that Spring Boot uses java config accross the board, a new `value` attribute is now aliased to the existing `classes` attribute such that one could write the following: @SpringApplicationConfiguration(MyConfig.class) public class MyTest {} Closes gh-3635
24 lines
342 B
Groovy
24 lines
342 B
Groovy
@SpringApplicationConfiguration(Application)
|
|
@IntegrationTest
|
|
class BookTests {
|
|
@Autowired
|
|
Book book
|
|
@Test
|
|
void testBooks() {
|
|
assertEquals("Tom Clancy", book.author)
|
|
}
|
|
}
|
|
|
|
@Configuration
|
|
class Application {
|
|
@Bean
|
|
Book book() {
|
|
new Book(author: "Tom Clancy", title: "Threat Vector")
|
|
}
|
|
}
|
|
|
|
class Book {
|
|
String author
|
|
String title
|
|
}
|