You didn't mention which version of Spring you're using, but Spring 3.0 comes with Spring EL (Expression Language) which allows you to use expressions in the XML bean definitions (as well as other places, such as @Value annotations).
You can read more about Spring EL here