I have some static block of content which need to load on startup of Spring MVC application.
static{
// Added to use in the Log4J.xml file
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
System.setProperty("current.date", dateFormat.format(new Date()));
}
This 'current.date
' property I am doing to use in the log4j.xml
to set the current date.
I don't know where to put this into Spring's context so that It can call every time when user runs the application.