java接口报错之mybatis

225 阅读1分钟

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.demo.mappers.UserMapper.findUser] with root cause:

上图

请教大佬后发现是mybaits未配置;配置为

mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
    auto-mapping-behavior: full
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  mapper-locations: classpath*:mappers/**/*Mapper.xml