添加任何自定义实体后出现jHispter Elasticsearch问题 [英] jHispter Elasticsearch issue after adding any custom entity

查看:55
本文介绍了添加任何自定义实体后出现jHispter Elasticsearch问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'countryServiceImpl' defined in file [E:\tms-ws\TransportManagement\target\classes\com\baltransport\tms\app\v1\service\impl\CountryServiceImpl.class]: 
  Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: 
  Error creating bean with name 'countrySearchRepository': Invocation of init method failed; 
  nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: 
    Constructor threw exception; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: Failed to build mapping for country:country
    at org.springframework. ...

在添加任何自定义实体后获取此jHispter Elasticsearch异常.

Getting this exception jHispter Elasticsearch issue after adding any custom entity .

第一次(使用默认的jdl)效果很好

It works perfectly fine first time (with default jdl)

推荐答案

U可以尝试:

  1. 删除数据库并重新创建.
  2. 随着新闻的变化(也许是新实体)导入您的jdl.
  3. 在docker中运行elasticsearch. (在您的项目中找到此文件.yml),并检查其是否正确运行(localhost:9200)
  4. 运行您的应用(整体或微服务)

致谢

这篇关于添加任何自定义实体后出现jHispter Elasticsearch问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆