SpringBoot2.0学习的Bug(Invalid bound statement, No converter found for return value of type:)
一、Invalid bound statement:绑定语句无效,这个问题很复杂,每一个人的解决方式不同,我的是mapper-locations中映射路径问题,我看着没问题,但还是重新copy路径试了一下。还真是这个问题。
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml
二、[org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class com.lsl.springbootdatajdbc.Entity.Table]
解决办法:我这里是实体类没写GET、SET方法。
本文主要介绍了在学习SpringBoot2.0过程中遇到的两个常见问题及其解决方法。一是`Invalidboundstatement`错误,问题出在mapper-locations配置,尽管路径看似正确,但复制并重新尝试后解决了问题。配置应为`mybatis.mapper-locations:classpath:mybatis/mapper/*.xml`。二是`HttpMessageNotWritableException`,原因是实体类缺少GET、SET方法,添加相应方法后问题得到解决。

被折叠的 条评论
为什么被折叠?



