1、有时出现找不到service层的方法
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xy.service.StudentService.find
需要 在springboot启动类加上
@MapperScan(basePackages = {"com.xy.mapper"}),不可以是com.xy.*
2、未开启驼峰规则(application.prop中 mybatis.configuration.map-underscore-to-camel-case=true)或
@MapperScan(basePackages = {"com.xy.mapper"}) 设置为com.xy.*
可能出现错误:
Field service in com.xy.controller.StudentController required a single bean, but 2 were found: