Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@Mapping @Mapper Error No source parameter(s) exists

I have been shifting my project from spring to Spring Boot and introducing embedded tomcat there were some adaptations i have to do Only issue i am facing in my Old project i have Mapper interface.

and when i compile project it start giving error

Error:(12, 5) java: No property named "schoolId" exists in source parameter(s).

I have search alot about it some said lombok dependency placement in pom i tried placing it before and after map-struct dependency but error is still here

Following is my class

enter image description here

Following is error i am facing

enter image description here

like image 434
Shermeen Avatar asked Sep 19 '25 00:09

Shermeen


1 Answers

I think you should re-order the lombok and mapstruct dependencies in the pom.xml file and it works fine.

Strict ordering should be like this

  1. lombok
  2. mapstruct

enter image description here

like image 80
turong Avatar answered Sep 20 '25 13:09

turong