Static hashmap not working
问题 I have a multi module maven project. In which I have initialized a static hashmap in a common module. I am inserting values in that hashmap in other module called controller and when I want to iterate that hashmap in third module then it gives null. Here is my static hashmap initialization: public static HashMap<String, Integer> hmSimultaneousRequestTracker = new HashMap<String, Integer>(); Controller module: Constants.hmSimultaneousRequestTracker.put(inputjson.getSettings().getUsername(),1);