资源文件在ch5.applicationContext.MessageResource包内,资源主名是labels < bean id ="messageSource" class ="org.springframework.context.support.ResourceBundleMessageSource" > < property name ="basenames" > < list > < value > ch5.applicationContext.MessageResource.labels </ value > </ list > </ property > </ bean > 或者 < bean id ="messageSource" class ="org.springframework.context.support.ResourceBundleMessageSource" > < property name ="basenames" > < list > < value > classpath:ch5/applicationContext/MessageResource/labels </ value > </ list > </ property > </ bean >