英文:
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:
- explicitly define the configuration location with
-Dhazelcast.config=<path-to-config>
- use programmatic configuration
If nothing works for you, then please share a minimal sample project to reproduce the issue.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论