KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to do this ? Currently it is done like this : <bean id="resource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames"> <list> <value>content.Language</value> </list> </property> </bean> @Autowired protected MessageSource resource; protected String getMessage(String code, Object[] object, Locale locale) { return resource.getMessage(code, object, locale); } Is there a way for it to be like getting properties via @Value annotation ? <util:properties id="generals" location="classpath:portlet.properties" /> @Value("#{generals['supported.lang.codes']}") public String langCodes; Because having to call the method is usually fine, but for instance when unit testing, this is pain in ... ... Well in some cases, webdriver's PageObject pattern where objects don't have no initialization, this would be really helpful
Tags (comma-separated)
Save Edits
Cancel