MapStruct implementation is not working in Spring Boot Web Application

前端 未结 5 1709
醉话见心
醉话见心 2021-02-06 13:07

I am a newbie to Spring Boot and MapStruct Tool.

Earlier, A Project(written by other team using these technologies) is not starting up. Then, I had made some changes i

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 14:03

    For making all mapper classes to qualify as spring bean add following compilerArgs to your maven-compiler-plugin.

    
    -Amapstruct.suppressGeneratorTimestamp=true
    -Amapstruct.defaultComponentModel=spring
     
    

    if using maven-processor-plugin add following options

                           
    
    true
                          
    
    spring
    
    
    

提交回复
热议问题