springboot+elasticsearch 报错
错误1: .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
次报错是由于配置文件application.properties里面打开了一下注释
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=127.0.0.1:9200
spring.data.elasticsearch.properties.path.logs=./elasticsearch/log
spring.data.elasticsearch.properties.path.logs=./elasticsearch/data
错误2:包名不一致引起的报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Test.ElasticSearchTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private inter.ArticleSearchRepository

当修改每个包的名称后,也即统一包名开头后,成功运行。

成功运行截图如下:

总结原因:application.java启动类一定要放在com包,也就是根目录下的一个包下,不能放在和其他三个包并列的包里面,切记!!找了一晚上的原因。
还有下图是变幻包视图结构。

springboot+elasticsearch 报错的更多相关文章
- Springboot整合Elasticsearch报错availableProcessors is already set to [4], rejecting [4]
Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...
- elasticsearch报错之 memory locking requested for elasticsearch process but memory is not locked
安装elasticsearch报错如下: [2019-01-14T03:57:16,453][ERROR][o.e.b.Bootstrap ] [ip-172-31-30-62.ec2.interna ...
- elasticsearch报错:None of the configured nodes are available: []
问题:在内网测试的时候可以正常访问,但是部署到外网上客户端连接elasticsearch报错:None of the configured nodes are available: [] 原因:默认情 ...
- 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.
运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...
- Elasticsearch 报错:Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load fielddata in memory by uninverting the inverted index.
Elasticsearch 报错: Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_fi ...
- SpringBoot启动报错Failed to determine a suitable driver class
SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...
- springboot 启动报错"No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available"
1.问题 springboot启动报错 "D:\Program Files\Java\jdk-11\bin\java.exe" -XX:TieredStopAtLevel=1 -n ...
- SpringBoot启动报错:ould not be registered. A bean with that name has already been defined in file and overriding is disabled.
SpringBoot启动报错 ***************************APPLICATION FAILED TO START*************************** Des ...
- Java访问Elasticsearch报错Request cannot be executed; I/O reactor status: STOPPED
简介 使用ES过程中遇到一个Request cannot be executed; I/O reactor status: STOPPED 的异常,大概意思是和server端的连接异常终止了.开始以为 ...
随机推荐
- python二级考试知识点——turtle、random、time、PyInstaller、jieba、wordcloud
turtle库(必考) 1.from turtle import * #导入turtle库中的所有方法 2.turtle.pensize(size) #画笔的大小 3.turtle.pencolor( ...
- Windows下安装jdk-12.0.2
Java更新到12,新版本的Java中不再存在jre,配置环境变量有所改变. 下载最新jdk 下载地址:https://www.oracle.com/technetwork/java/javase/d ...
- 【OpenJ_Bailian - 2790】迷宫(bfs)
-->迷宫 Descriptions: 一天Extense在森林里探险的时候不小心走入了一个迷宫,迷宫可以看成是由n * n的格点组成,每个格点只有2种状态,.和#,前者表示可以通行后者表示不 ...
- 【神经网络与深度学习】YOLO windows 配置《Darknet配置》
作者配置时的环境 visual studio 2013 显卡 GTX 960M CUDA 7.5 OpenCV 2.4.9 pthreadpthread 下载地址 YOLO官网 [http:// ...
- 【DSP开发】mailbox的使用
在DSP项目开发中,我用mailbox实现了进程间的通信,通过接收网络控制进程发来的mailbox,实现了云台的控制,其中需要学习的地方有两点:一是mailbox通信机制的学习,二是DSP时间管理机制 ...
- elasticsearch的备份和恢复(转)
vim /etc/elasticsearch/elasticsearch.yml path.repo: ["/data/backups/es_backup"] #备份目录,根据自己 ...
- sftp服务器配置
环境依赖:openssh-server >=4.8 //ssh -V 查看 安装环境: centos6,centos7 1.创建用户组 sftp groupadd sftp 2.创建登录用 ...
- 前端开发工具包 WijmoJS 2019V1正式发布:全新的在线 Demo 系统,助您快速上手,开发无忧
前端开发工具包WijmoJS在2019年的第一个主要版本2019V1已经发布,本次发布包括了更加易用的在线Demo系统.各控件新增功能.NPM 包的改动,以及全新的浏览器API组件. WijmoJ ...
- Spring boot 整合CXF webservice 遇到的问题及解决
将WebService的WSDL生成的代码的命令: wsimport -p com -s . com http://localhost:8080/service/user?wsdl Spring bo ...
- 更换composer镜像源为阿里云
说一说我为什么会更换镜像源,今天我准备给公司的项目添加一个 Excel 导出的功能,需要 PhpSpreadsheet 插件来实现我的功能.输入命令发现提示我 Authentication req ...