Skip to content

Commit 7c71d9f

Browse files
authored
Merge pull request #13852 from codeconsole/7.0.x-isolate-tests
use EnableAutoConfiguration over SpringBootApplication
2 parents c0750cb + 40bc241 commit 7c71d9f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

grails-web-boot/src/test/groovy/grails/boot/EmbeddedContainerWithGrailsSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package grails.boot
33
import grails.artefact.Artefact
44
import grails.boot.config.GrailsAutoConfiguration
55
import grails.web.Controller
6-
import org.springframework.boot.autoconfigure.SpringBootApplication
6+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
77
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
88
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
99
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
@@ -31,7 +31,7 @@ class EmbeddedContainerWithGrailsSpec extends Specification {
3131
new URL("http://localhost:${context.webServer.port}/foos").text == 'all foos'
3232
}
3333

34-
@SpringBootApplication
34+
@EnableAutoConfiguration
3535
static class Application extends GrailsAutoConfiguration {
3636
@Bean
3737
ConfigurableServletWebServerFactory webServerFactory() {

grails-web-boot/src/test/groovy/grails/boot/GrailsSpringApplicationSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package grails.boot
22

33
import grails.boot.config.GrailsAutoConfiguration
44
import org.springframework.boot.SpringApplication
5-
import org.springframework.boot.autoconfigure.SpringBootApplication
5+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
66
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
77
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
88
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
@@ -32,7 +32,7 @@ class GrailsSpringApplicationSpec extends Specification{
3232
}
3333

3434

35-
@SpringBootApplication
35+
@EnableAutoConfiguration
3636
static class Application extends GrailsAutoConfiguration {
3737
@Bean
3838
ConfigurableServletWebServerFactory webServerFactory() {

0 commit comments

Comments
 (0)