spring-boot/spring-boot-cli/test-samples/integration_auto_test.groovy
Dave Syer 064998697d Ensure CLI adds @EnableAutoConfiguration in an appropriate place
Up to now we have been treating the *first* class to be compiled
as the "main" application and adding @EnableAutoConfiguration. This
isn't always appropriate (e.g. if it's a test case), so now we
look for an appropriate annotation before falling back to the old
behaviour.

In addition ensures classes with a field of type Reactor trigger
the reactor auto imports.

See gh-969
2014-05-28 13:00:31 +01:00

14 lines
196 B
Groovy

@SpringApplicationConfiguration(classes=ReactorApplication)
@IntegrationTest('server.port:0')
class RestTests {
@Autowired
Reactor reactor
@Test
void test() {
assertNotNull(reactor)
}
}