luigi Soviero
luigi Soviero

Reputation: 3

UnsatisfiedDependencyException for mapper class

I have created jhipster application. when I start the application I get this error:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'categoryServiceImpl' defined in file [/server_2/target/classes/com/test/test/service/impl/CategoryServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.test.test.service.mapper.CategoryMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

can you help me please?

Upvotes: 0

Views: 1268

Answers (1)

Gaël Marziou
Gaël Marziou

Reputation: 16284

CategoryMapperImpl is generated at build time by mapstruct annotation processor from CategoryMapper interface that was generated by JHipster when importing your JDL file, make sure you have run mvnw or gradlew to generate it before starting your app.

See official doc about using DTOs: https://www.jhipster.tech/using-dtos/

Upvotes: 1

Related Questions