Issue Details (XML | Word | Printable)

Key: SPR-6204
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Marcel Overdijk
Votes: 3
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Add ConfigSlurperPlaceholderConfigurer

Created: 07/Oct/09 03:36 PM   Updated: 08/Oct/09 05:34 AM
Component/s: SpringCORE
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ConfigSlurperPlaceholderConfigurer.java (5 kB)
2. Java Source File ConfigSlurperPlaceholderConfigurer.java (5 kB)
3. Java Source File ConfigSlurperPlaceholderConfigurer.java (5 kB)
4. Java Source File ConfigSlurperPlaceholderConfigurer.java (5 kB)



 Description  « Hide

Subclass of PropertyPlaceholderConfigurer that resolves placeholders from a properties object loaded using a Groovy's ConfigSlurper.

ConfigSlurperPlaceholderConfigurer also supports the concept of per environment configuration via "environment" and "defaultEnvironment" properties. The "environment" property will be typically set using a system property.



Marcel Overdijk added a comment - 07/Oct/09 03:37 PM

Patch supplied.


Marcel Overdijk added a comment - 07/Oct/09 03:47 PM

Tareq Abedrabbo added a comment - 08/Oct/09 03:48 AM

Hi Marcel,

It's nice to see that you like the GroovyPlaceholderConfigurer and that you made it more useful by adding the environment support. Since my original code is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/3.0/), can you please add my name to yours as an author to this class?

Thanks,

Tareq


Marcel Overdijk added a comment - 08/Oct/09 03:52 AM

Adedd Tareq Abedrabbo to list of authors.


Tareq Abedrabbo added a comment - 08/Oct/09 04:10 AM

Thanks!


Marcel Overdijk added a comment - 08/Oct/09 05:34 AM

Exposed both the ConfigObject as flattened ConfigObject (Map) using public getters.
This is useful for accessing the ConfigObject config properties directly.