spring基于注解的ioc

2020-01-20  本文已影响0人  茶酒qqq

spring基于注解的ioc

教学内容

  1. Spring中的ioc常用注解

  2. 案例使用xml和注解方式实现单标的CRUD操作

    持久层技术选择:dbutils

  3. 改造基于注解的ioc案例,使用纯注解方式实现

    spring 的一些新注解使用

  4. spring和Junit的整合

使用注解前配置xml

core搜索xmlns:context就有了

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">
    <context:component-scan base-package="com.chajiu.service"></context:component-scan>
</beans>

四个对应-注解和xml标签对应

上一篇 下一篇

猜你喜欢

热点阅读