SpringBoot整合Elasticsearch报错availableProcessors is already set to [4], ...
Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了。 nested exception is java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4] 我网上查询了一下,有人是是因为整合了Redis的原因。但是我把Redis相关的配置去掉后,问题还是没有解决,最后有人说是因为netty冲突的问题。 也有人给出了解决方式就是在项目初始化钱设置一下一个属性。在初始化之前加上System.setProperty("es.set.netty.runtime.available.processors", "false"); @Configuration public class ElasticSearchConfig { @PostConstruct void init() { System.setProperty("es.set.netty.runtime.availab...
