Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: reading values from a properties/config file in Rest Builder
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?
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.
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.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™