映射器的 UnsatisfiedDependencyException class
UnsatisfiedDependencyException for mapper class
我已经创建了 jhipster 应用程序。当我启动应用程序时出现此错误:
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: {}
你能帮帮我吗?
CategoryMapperImpl
是在构建时由 mapstruct 注释处理器从 CategoryMapper
接口生成的,该接口是 JHipster 在导入 JDL 文件时生成的,确保你有 运行 mvnw
或 gradlew
在启动您的应用程序之前生成它。
查看关于使用 DTO 的官方文档:https://www.jhipster.tech/using-dtos/
我已经创建了 jhipster 应用程序。当我启动应用程序时出现此错误:
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: {}
你能帮帮我吗?
CategoryMapperImpl
是在构建时由 mapstruct 注释处理器从 CategoryMapper
接口生成的,该接口是 JHipster 在导入 JDL 文件时生成的,确保你有 运行 mvnw
或 gradlew
在启动您的应用程序之前生成它。
查看关于使用 DTO 的官方文档:https://www.jhipster.tech/using-dtos/