Преглед на файлове

使用WebApplicationContext

zhouhao преди 6 години
родител
ревизия
985e7974e2
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      hsweb-tests/src/main/groovy/org/hswebframework/web/tests/HswebSpecification.groovy

+ 2 - 1
hsweb-tests/src/main/groovy/org/hswebframework/web/tests/HswebSpecification.groovy

@@ -7,6 +7,7 @@ import org.springframework.test.context.ContextConfiguration
 import org.springframework.test.context.web.WebAppConfiguration
 import org.springframework.test.web.servlet.MockMvc
 import org.springframework.test.web.servlet.setup.MockMvcBuilders
+import org.springframework.web.context.WebApplicationContext
 import spock.lang.Shared
 import spock.lang.Specification
 
@@ -19,7 +20,7 @@ import spock.lang.Specification
 @SpringBootTest(classes = [HswebTestApplication.class], properties = ["classpath:application.yml"])
 class HswebSpecification extends Specification {
     @Autowired
-    protected ConfigurableApplicationContext context;
+    protected WebApplicationContext context;
 
     @Shared
     protected MockMvc mockMvc;