Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Grails测试应用程序从applicationContext.xml加载bean_Spring_Grails_Spring Mvc_Integration Testing - Fatal编程技术网

Spring Grails测试应用程序从applicationContext.xml加载bean

Spring Grails测试应用程序从applicationContext.xml加载bean,spring,grails,spring-mvc,integration-testing,Spring,Grails,Spring Mvc,Integration Testing,我有一个Grails应用程序,它在WEB-INF/applicationContext.xml中定义bean。resources.groovy未用于本主题以外的原因。当我尝试运行grails测试应用程序时,Spring无法将bean注入服务,因此测试正在中断。如何让grails test app也从applicationContext.xml加载bean?在多次尝试使用applicationContext.xml后,我将所有bean定义都移动到resources.grooy,因此run app和

我有一个Grails应用程序,它在WEB-INF/applicationContext.xml中定义bean。resources.groovy未用于本主题以外的原因。当我尝试运行grails测试应用程序时,Spring无法将bean注入服务,因此测试正在中断。如何让grails test app也从applicationContext.xml加载bean?

在多次尝试使用applicationContext.xml后,我将所有bean定义都移动到resources.grooy,因此run app和test app都能识别它们。