Eclipse STS中的Jhipster

时间:2016-10-06 12:25:26

标签: eclipse gradle jhipster

我创建了一个项目3.6.1 Jhipster(Gradle) 要调试后端导入项目STS 3.8.1。 从“Boot Dashboard”选项卡中运行应用程序。 我收到以下错误:

[2m2016-10-06 14:14:51.306[0;39m [31mERROR[0;39m [35m32187[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [36mo.s.boot.SpringApplication              [0;39m [2m:[0;39m Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'categoriaResource': Unsatisfied dependency expressed through field 'categoriaMapper': No qualifying bean of type [com.abalia.atletico.service.mapper.CategoriaMapper] found for dependency [com.abalia.atletico.service.mapper.CategoriaMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.abalia.atletico.service.mapper.CategoriaMapper] found for dependency [com.abalia.atletico.service.mapper.CategoriaMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.abalia.atletico.service.mapper.CategoriaMapper] found for dependency [com.abalia.atletico.service.mapper.CategoriaMapper]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}

这是一个有三个实体的新项目。 如果我运行控制台运行良好,但我需要调试。 如果我向Eclipse STS添加一些插件或配置

.yo-rc.json:

{"generator-jhipster": {
"jhipsterVersion": "3.6.1",
"baseName": "atletico",
"packageName": "com.aaa.bbb",
"packageFolder": "com/aaa/bbb",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "hazelcast",
"clusteredHttpSession": "hazelcast",
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"buildTool": "gradle",
"enableSocialSignIn": true,
"jwtSecretKey": "dabb542aa2359c0c77c19bc6aeefc3af1700cec6",
"useSass": true,
"applicationType": "monolith",
"testFrameworks": [
  "gatling",
  "cucumber",
  "protractor"
],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "es",
"languages": [
  "es",
  "en"
]

} }

1 个答案:

答案 0 :(得分:-1)

这似乎是生成的输出的问题。

关注these instructions,您需要做的是:

  

添加apt生成的源文件夹以构建路径

     

使用buildship gradles时,默认的outputfolder会被过滤,在您的工作区中不可见。因此,您需要将其从eclipse的资源过滤器设置中删除。

     
      
  • 右键单击您的项目,然后选择属性
  •   
  • 选择资源
  •   
  • 删除条目构建
  •   
  • 选择Java Build Path
  •   
  • 点击添加文件夹...
  •   
  • 检查路径build / generated / source / apt / main
  •   
     

通过eclipse运行JHipster时,确保新的源文件夹包含正确生成的映射器实现。