spring中bean的更新方法及在不同环境下的问题 如果spring中bean的配置信息是放在xml中,如果修改了bean的配置信息,如果在不重启服务器的前提下生效?我的办法是用ApplicationContext重新读取指定的配置文件,然后更新一下所有bean。
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("xml/achievement.xml");