Spring知识Part01

    技术2022-07-17  71

    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);
    Processed: 0.012, SQL: 9