Search code examples
playframeworkapplication-singleton

Playframework: Best Solution for loading & using constant Strings


I have a bunch of static Strings that I'd like to store in a .yml file. What's the best design practice to load them to a Java Class & use it.

In other words, I'm looking for an Application-wide Singleton class holding resource strings, but confused as to where to put them (Models, Controllers).

I also don't want to make any obvious mistakes that'll hit performance

Update: found the solution http://www.playframework.org/documentation/1.2.2/i18n#messages


Solution

  • Update: found the solution http://www.playframework.org/documentation/1.2.2/i18n#messages