【错误记录】Error creating bean with name: Unsatisfied dependency expressed through field

启动一个Spring boot集成mybatis plus报错:
Error creating bean with name ‘examManageController’: Unsatisfied dependency expressed through field ‘examManageService’
描述:
【错误记录】Error creating bean with name: Unsatisfied dependency expressed through field_第1张图片
启动类中有加注解mapperscan:

@MapperScan("com.naughty.userlogin02.dao")
@SpringBootApplication
public class Userlogin02Application {

    public static void main(String[] args) {
        SpringApplication.run(Userlogin02Application.class, args);
    }

}

仔细看发现路径是com.naughty.userlogin02.dao,而自己的’examManageController’:并没有在这个包下面
于是转移了这个文件:
【错误记录】Error creating bean with name: Unsatisfied dependency expressed through field_第2张图片
再启动:
【错误记录】Error creating bean with name: Unsatisfied dependency expressed through field_第3张图片
虽然能启动了但是还有报错
mapper[com.naughty.userlogin02.dao.ExamManageMapper.findAll] is ignored, because it exists, maybe from xml file
另外要记得service中有加注解:
【错误记录】Error creating bean with name: Unsatisfied dependency expressed through field_第4张图片

你可能感兴趣的:(Java,spring,boot,spring,java)