当出现service或者mapper找不到到时候会报以下错误:

    1. ***************************
    2. APPLICATION FAILED TO START
    3. ***************************
    4. Description:
    5. Field userInfoService in com.ck.admin_fiction.controller.UsreInfoController required a bean of type 'com.**.mapper.UserInfoMapper' that could not be found.
    6. The injection point has the following annotations:
    7. - @org.springframework.beans.factory.annotation.Autowired(required=true)
    8. Action:
    9. Consider defining a bean of type 'com.**.mapper.UserInfoMapper' in your configuration.
    10. Process finished with exit code 0

    问题截图:
    image.png

    解决办法:

    • 在对应的mapper或者service加注解@Mapper或者@Service

      • Mapper找不到image.png

      • Service找不到
        image.png