Configuration:
Spring 2.5, Junit 4, Log4j
The log4j file location is specified from a system property
${log.location}
At runtime, system property set with -D java option. All is well.
Problem / What I Need:
At unit test time, system property not set, and file location not resolved.
App uses Spring, would like to simply configure Spring to set the system property.
More Info:
Requirement is for configuration only. Can't introduce new Java code, or entries into IDE. Ideally, one of Spring's property configuration implementations could handle this--I just haven't been able to find the right combination.
This idea is close, but needs to add Java code:
Spring SystemPropertyInitializingBean
Any help out there? Any ideas are appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…