我正在尝试gradle test
并收到以下错误:
Caused by: java.lang.NoClassDefFoundError: Unable to load class grails.test.mixin.hibernate.HibernateTestMixin due to missing dependency org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext
看来这与
有关 @TestMixin(HibernateTestMixin)
还添加了依赖项:
testCompile 'org.grails:grails-datastore-core:5.0.5.RELEASE'
testCompile 'org.grails:grails-datastore-test-support:5.0.5.RELEASE'
答案 0 :(得分:1)
尝试替换此导入grails.web.servlet.context.GrailsWebApplicationContext
代替
org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext