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