How make an object that's shared across the entire application in play framework (1.x)?
问题 I want to make one instance of an object across the entire Play Application. I don't think static will work because Play uses many classloaders to load the same class many times (I confirmed this with a heap analysis). Is there something like InitialContext resources to store and retrieve an object instance across the entire app? 来源: https://stackoverflow.com/questions/37909439/how-make-an-object-thats-shared-across-the-entire-application-in-play-framework