Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Nov 17, 2024
1 parent d095cad commit 4b23183
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ 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.web.embedded.tomcat.TomcatServletWebServerFactory
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.EnableWebMvc
import spock.lang.Specification

/**
Expand All @@ -32,8 +31,7 @@ class EmbeddedContainerWithGrailsSpec extends Specification {
new URL("http://localhost:${context.webServer.port}/foos").text == 'all foos'
}

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

import grails.boot.config.GrailsAutoConfiguration
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
import org.springframework.context.ConfigurableApplicationContext
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.EnableWebMvc
import spock.lang.Specification

/**
Expand All @@ -34,8 +32,7 @@ class GrailsSpringApplicationSpec extends Specification{
}


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

0 comments on commit 4b23183

Please sign in to comment.