RE: reading values from a properties/config file in Rest Builder

kiran ankisetty, modified 5 Years ago. New Member Posts: 3 Join Date: 1/14/20 Recent Posts
Hi, i am using liferay rest builder to expose the rest services.  my custom logic requires to read values from properties / config file. how can we achieve this? Any samples? 
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
This has nothing to do with RESTBuilder.

Reading properties is a java-level activity. Do you not know how to use java.util.Properties?

Alternatively you could put the props in portal-ext.properties and use Liferay's PropsUtil class to access properties.

There are also packages that can help like EasyConf or commons-configuration. Spring has property handling support too.