Reputation: 165
Mapstruct generates a class after doing mvn clean install
, but if it's not done, and I run my spring boot application I get a class not found exception. I was wondering if there was anything I can do to my Eclipse or add something in my pom.xml files (it's multiple projects so I need to do mvn clean install
on each project first) so that Mapstruct generates the class when I just run my program normally
Upvotes: 3
Views: 1095
Reputation: 21413
In order to have the classes generated by the IDE you would need to set it up.
You can read more about Eclipse integration for MapStruct here.
In a nutshell you need to install the m2e-apt plugin for Eclipse, which picks up and applies the annotation processor settings automatically.
You would also need to add the following to your <properties>
in your pom.xml
<!-- automatically run annotation processors within the incremental compilation -->
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
Upvotes: 4