[
https://issues.apache.org/jira/browse/DELTASPIKE-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742864#comment-13742864
]
Christian Kaltepoth commented on DELTASPIKE-399:
------------------------------------------------
Actually I like the idea of having such a feature in DeltaSpike.
I agree with Aaron that loading configuration is a very special case that
should be implemented using a ConfigSource instead. But often there is a need
to load other stuff from the classpath. Typically you have to use the context
classloader to access such resources and this code can be very difficult to
test sometimes. The ability to simply inject such resources would be a great
addition to DeltaSpike IMHO.
Just for completeness, here is the documentation of the original Solder feature:
http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/solder-resourceloading.html
> Incorporate Solder's ResourceLoader features into DeltaSpike
> ------------------------------------------------------------
>
> Key: DELTASPIKE-399
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-399
> Project: DeltaSpike
> Issue Type: New Feature
> Components: Core
> Affects Versions: 0.4
> Reporter: Aaron Siri
> Priority: Minor
>
> Seam 3's Solder module had some nice resource loading functionality within
> the org.jboss.solder.resourceLoader packages. With it you could do the
> following:
> // Load a properties file
> @Inject @Resource("app.properties")
> private Properties appProperties;
> or:
> @Inject
> private ResourceProvider resourceProvider
> public Properties getHostProperties() {
> String hostname = java.net.InetAddress.getLocalHost().getHostName();
> return resourceProvider.loadPropertiesBundle(hostname + ".properties");
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira