SaiUpadhyayula / spring-reddit-clone

Reddit clone built using Spring Boot, Spring Security with JWT Authentication, Spring Data JPA with MySQL, Spring MVC. The frontend is built using Angular - You can find the frontend source code here - https://github.com/SaiUpadhyayula/angular-reddit-clone
658 stars 386 forks source link

CommentMapper bean error during runtime #2

Closed iamnav closed 4 years ago

iamnav commented 4 years ago

APPLICATION FAILED TO START


Description:

Parameter 3 of constructor in com.programming.techie.springredditclone.service.CommentService required a bean of type 'com.programming.techie.springredditclone.mapper.CommentMapper' that could not be found.

Action:

Consider defining a bean of type 'com.programming.techie.springredditclone.mapper.CommentMapper' in your configuration.

*Edit: This error is appearing for every Mapper interface/abstract class

SaiUpadhyayula commented 4 years ago

Can you try to run the command mvn clean install and check again ?

At compile time a CommentMapperImpl class should be generated, if not it will throw this error.

Also make sure you have added mapstruct to the maven compiler plugin configuration.

iamnav commented 4 years ago

Hey, Thanks for the quick response. That did the trick! also as I am using Eclipse, I had to do some preference settings bit differently than intelliJ