Mappers.getMapper
时间: 2023-12-04 16:06:08 浏览: 145
mapper生成器
Mappers.getMapper是一个MapStruct框架提供的方法,用于获取一个mapper实例。在不适用依赖注入的框架时,可以使用Mappers.getMapper方法来获取mapper实例。例如,在CarMapper接口中使用Mappers.getMapper方法获取CarMapper.INSTANCE实例,并通过该实例调用carToCarDto方法将Car对象转换为CarDto对象。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [[MapStruct]如何获取Mapper](https://blog.csdn.net/liuhaibo_ljf/article/details/126347157)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [Java实体映射工具MapStruct使用详解](https://blog.csdn.net/guanshengg/article/details/126545276)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文