Mapped Statements collection does not contain value for

Spring Boot

异常信息:

Mapped Statements collection does not contain value for 
com.test.test.member.mapper.mysql.ClientMapper.queryClientById2

#映射语句集合不包含com.test.test.member.mapper.mysql.ClientMapper.queryclientbyid2的值
-->也就是说找不到这个ClientMapper的queryClientById2方法

代码信息:

@Select("select * from test.order_dealer where order_no=#{orderNo}")
    @Results({
            @Result(column = "client_id", property = "client",
                    one = @One(
 select ="com.test.test.member.mapper.mysql.ClientMapper.queryClientById2",
                            fetchType = FetchType.DEFAULT
                    )
            )
    })
public Order queryOrderByOrderNo(...);

错误修改:(未找到Mapper层,启动类中添加该Mapper到MapperScan)

@SpringBootApplication
@EnableTransactionManagement
@MapperScan({
"com.test.test.system.mapper.mysql",
"com.test.test.quotation.mapper.mysql",
"com.test.test.product.mapper.mysql",
"com.test.test.task.mapper.mysql",
"com.test.test.order.mapper.mysql",
"com.test.test.member.mapper.mysql"})
public class CloudhomeApplication {
   .....
}

 

你可能感兴趣的:(后端)