Java Ninja Chronicles By Norris Shelton

Things I learned in the pursuit of code

A friend of mine had to use this and I thought it was something worth remembering for the Springframework.

    <util:list id="tmDateFormats" >
        <value>yyyy-MM-dd</value>
        <value>dd-MMM-yy</value>
        <value>MM/dd/yyyy</value>
    </util:list>

He injected them with SpEl

    @Resource(name="tmDateFormats")
    private List<String> dateFormats;

February 6th, 2014

Posted In: Java, Spring

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

WP to LinkedIn Auto Publish Powered By : XYZScripts.com