Invalid bound statement (not found): com.glshopproject.dao.UserDOMapper.selectByPrimaryKey,找不到selectByPrimaryKey,找不到解决的办法
@SpringBootApplication(scanBasePackages = {"com.glshopproject"}) @RestController @MapperScan("com.glshopproject.dao") public class App { @Autowired private UserDOMapper userDOMapper; @RequestMapping("/") public String home() { UserDO userDO= userDOMapper.selectByPrimaryKey(1); if (userDO==null) {return "用户对象不存在";} else{ return userDO.getName(); } } public static void main( String[] args ) { System.out.println( "Hello World!" ); SpringApplication.run(App.class,args); } }