1、导入坐标 2、创建bean 3、创建applicationContext.xml(随便叫什么xml都可以,但通常都是这个xml名字) 4、在配置文件中进行配置 5、创建applicationContext对象getBean