ES安装使用问题

①linux 启动es, 1)切换用户 su命令(root用户不能启动) 2)bin目录启动(其他用户可能没有权限,sudo chown -R kf elasticsearch sudo chgrp -R kf elasticsearch )

②ES解决跨域问题 在config下的yml配置文件中添加:

http.cors.enabled: true
http.cors.allow-origin: "*"

③ES下出现 The bean 'userRepository', defined in null, could not be registered. A bean with that name has already been defined in file XXX and overriding is disabled.基于Herbinate的需要给实体类加上@Doucument

④ES下出现xxxRepository Bean已经存在问题 按照控制台下的提示改错。在yml中配置bean可覆盖

spring:  

   main:  

        allow-bean-definition-overriding: true

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章