我创建了jhipster应用程序 . 当我启动应用程序时,我收到此错误:
org.springframework.beans.factory.UnsatisfiedDependencyException:在文件[/server_2/target/classes/com/test/test/service/impl/CategoryServiceImpl.class]中定义名称为'categoryServiceImpl'的bean时出错:通过构造函数表示不满意的依赖关系参数1;嵌套异常是org.springframework.beans.factory.NoSuchBeanDefinitionException:没有'com.test.test.service.mapper.CategoryMapper'类型的限定bean可用:预期至少有1个bean可以作为autowire候选者 . 依赖注释:{}
你能帮我吗?
1 回答
CategoryMapperImpl
是由构造时生成的,由JHipster在导入JDL文件时生成的CategoryMapper
接口生成CategoryMapperImpl
,确保在启动应用程序之前运行mvnw
或gradlew
来生成它 .查看有关使用DTO的官方文档:https://www.jhipster.tech/using-dtos/