为了账号安全,请及时绑定邮箱和手机立即绑定

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);
    }
}


正在回答

1 回答

application.properties文件有单词拼错,低级错误,嘤嘤嘤

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Invalid bound statement (not found): com.glshopproject.dao.UserDOMapper.selectByPrimaryKey,找不到selectByPrimaryKey,找不到解决的办法

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信