How to access *.properties file in Seam application
-
27-09-2019 - |
문제
Is there a way to access properties files in seam app? I'm looking for some kind of resource loader..
Thanks in advance!
해결책
There is actually Seam native component - ResourceLoader which can be simply injected with @In and it gives an access to the property files via ResourceBundle.
Example:
import org.jboss.seam.core.ResourceLoader;
...
@In
private ResourceLoader resourceLoader;
...
resourceLoader.getResource("BUNDLE_NAME");
다른 팁
This post from the official seam forum may help you.
제휴하지 않습니다 StackOverflow