spring-service.xml

Posted on 2021-04-04 21:49  LebronD  阅读(150)  评论(0编辑  收藏  举报
<?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">

<!-- 1,扫描service下的包-->
<context:component-scan base-package="com.taskMaster.service"></context:component-scan>
<!-- 2,将所有的业务类注入到spring配置注解,也可以用注解完成(推荐)-->
<bean id="UserLoginServiceImpl" class="com.taskMaster.service.UserLoginServiceImpl"></bean>
<!-- 3,声明式事务-->
<!-- <bean id="transactionmanage" class="org.springframework"-->
</beans>

Copyright © 2024 LebronD
Powered by .NET 9.0 on Kubernetes