Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


spring boot 报错:
Caused by: org.springframework.beans.NotWritablePropertyException:
Invalid property ‘mapperHelper’ of bean
class [org.mybatis.spring.mapper.MapperFactoryBean]:
Bean property ‘mapperHelper’ is not writable or has an invalid setter method.
Does the parameter type of the setter match the return type of the getter?

原因是:通用mapper不支持热部署,不支持devtool。

解决方法:在pom.xml屏蔽掉热部署就OK了。

<!-- 热启动配置  -->
 <dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-devtools</artifactId>
     <optional>true</optional>
 </dependency>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM