单元测试失败-未能加载applicationcontext java.lang.illegalstateexception:未能加载applicationcontext

doinxwow  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(342)

单元测试已停止工作。我得到上下文错误:

Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'executionProductionRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract void com.project.repository.BaseRepository.refresh(java.lang.Object)! No property refresh found for type ExecutionProduction!

Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract void com.repository.BaseRepository.refresh(java.lang.Object)! No property refresh found for type ExecutionProduction!

我的上下文配置文件:

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest 
class ProjectBackendApplicationTests {

    @Test
    void contextLoads() {
    }

}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题