Why call afterPropertiesSet() here? Ain't it already called by context via InitializingBean as it's defined as bean in xml. I assume that's because of a setFileNameExpression(), but then shouldn't that be handled when template is created by context, not in a constructor of an other bean.