Skip to content

Commit

Permalink
Merge pull request #13852 from codeconsole/7.0.x-isolate-tests
Browse files Browse the repository at this point in the history
use EnableAutoConfiguration over SpringBootApplication
  • Loading branch information
codeconsole authored Nov 21, 2024
2 parents c0750cb + 40bc241 commit 7c71d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package grails.boot
import grails.artefact.Artefact
import grails.boot.config.GrailsAutoConfiguration
import grails.web.Controller
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
Expand Down Expand Up @@ -31,7 +31,7 @@ class EmbeddedContainerWithGrailsSpec extends Specification {
new URL("http://localhost:${context.webServer.port}/foos").text == 'all foos'
}

@SpringBootApplication
@EnableAutoConfiguration
static class Application extends GrailsAutoConfiguration {
@Bean
ConfigurableServletWebServerFactory webServerFactory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package grails.boot

import grails.boot.config.GrailsAutoConfiguration
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
Expand Down Expand Up @@ -32,7 +32,7 @@ class GrailsSpringApplicationSpec extends Specification{
}


@SpringBootApplication
@EnableAutoConfiguration
static class Application extends GrailsAutoConfiguration {
@Bean
ConfigurableServletWebServerFactory webServerFactory() {
Expand Down

0 comments on commit 7c71d9f

Please sign in to comment.