task/spring/target/classes/app.xml

14 lines
1.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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">-->
<!-- &lt;!&ndash;Spring容器注入对象&ndash;&gt;-->
<!-- &lt;!&ndash;spring的容器角度来看Spring容器负责将依赖的对象复制给调用者的成员变量相当于setter方法这就是 byName Spring的依赖注入&ndash;&gt;-->
<!--&lt;!&ndash; <property name="userDao" ref="userDao"/>&ndash;&gt;-->
<!-- </bean>-->
</beans>