generated from JUZIZZZ/javaee
14 lines
1.1 KiB
XML
14 lines
1.1 KiB
XML
|
<?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 https://www.springframework.org/schema/context/spring-context.xsd">
|
|||
|
<!--开启注解-->
|
|||
|
<context:component-scan base-package="com.gezenghuang.spring"/>
|
|||
|
<!-- <bean id="userDao" class="com.gezenghuang.spring.UserDao"/>-->
|
|||
|
<!-- <bean id="userService" class="com.gezenghuang.spring.UserService" autowire="byName">-->
|
|||
|
<!-- <!–Spring容器注入对象–>-->
|
|||
|
<!-- <!–spring的容器角度来看,Spring容器负责将依赖的对象复制给调用者的成员变量,相当于setter方法,这就是 byName Spring的依赖注入–>-->
|
|||
|
<!--<!– <property name="userDao" ref="userDao"/>–>-->
|
|||
|
<!-- </bean>-->
|
|||
|
</beans>
|