使用 hazelcast-3.6.jar 创建的服务器未从 hazelcast.xml 获取配置

Server created using hazelcast-3.6.jar is not picking up configs from hazelcast.xml

我正在使用 spring 启动来测试我的 Rest API 和 hazelcast-3.6 因为 DB.I 我正在使用 hazelcast-3.6.jar 来设置一个server.The 以这种方式创建的服务器没有从 hazelcast.xml 中获取属性 provided.Can 有人指导我如何让它从 hazelcast.xml 中获取属性吗?

确保将 hazelcast.xml 放到正确的目录中。 请查看 Checking configuration 手册部分,其中解释了配置文件检查的顺序: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#checking-configuration

运行 你用 -Dhazelcast.config=<path to hazelcast.xml> 编程或者把你的 hazelcast.xml 放在类路径中。

请查找将 Hazelcast 与 Spring Boot here 结合使用的示例。 Here 您可以找到如何使用 Spring 配置 Hazelcast。