1、通过<context:component-scan base-package=“com.zhang.scorange.interviewVideo.springVideo”></context:component-scan> 自动扫描注入后
id 默认小写开头
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
UserDao dao = context.getBean("userDao", UserDao.class);