Accessing message.properties values via Java code

I’m improving the OAuth module and I wanted to utilize the properties stored in message.properties file in a Java class (api section of the module).

I have tried using @Value annotation (it worked with a regular spring project) to access the properties but it did not work in OpenMRS. What is the correct way to access properties in message.properties through a Java Class?

Hi @maany,

I believe this is for internationalization purpose? May be this will be helpful Accessing messages.properties on the client-side

Thanks, Harsha

Try Context.getMessageSourceService().getMessage