如何覆盖默认的hazelcast.xml配置?

huangapple go评论84阅读模式
英文:

how to override default hazlecast.xml configuration?

问题

最近在我的现有Spring MVC项目中集成了Hazelcast。我想要禁用多播自动发现机制,并希望通过IP地址来实现。已经在Hazelcast.xml中进行了必要的更改,并将其放置在资源目录下,即WEB-INF/classes,但配置没有被覆盖。默认配置仍然生效,多播发现模式仍然没有被禁用。请告诉我如何在Spring MVC项目中禁用多播发现?

英文:

Recently integrated Hazelcast in my existing spring mvc project. i want to disable multicast autodiscovery mechanism and want it through ip address. done the required changes in Hazelcast.xml and put it under resources i.e WEB-INF/classes but configuration not override.default configuration is active and multicast discovery mode not getting disabled. so let me know how to disable multicast discovery in spring mvc project?

答案1

得分: 1

如果 hazelcast.xml 位于您的类路径中,它应该会自动应用。您可以查看 Hazelcast 参考手册:检查配置

如果对您不起作用,您总是可以:

  • 使用 -Dhazelcast.config=<path-to-config> 显式地定义配置位置
  • 使用 编程配置

如果以上方法对您都无效,请提供一个最小的示例项目以重现此问题。

英文:

If hazelcast.xml is on your classpath it should be automatically applied. You can check Hazelcast Reference Manual: Checking Configuration.

If it does not work for you, you can always:

If nothing works for you, then please share a minimal sample project to reproduce the issue.

huangapple
  • 本文由 发表于 2020年5月4日 23:22:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/61595709.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定