一个service调用到其他的service

在service.xml配制注入即可!

<bean id="personService" class="com.xx.service.impl.PersonServiceImpl">
        <property name="userService" ref="userService"/>
</bean>

然后在:PersonServiceImpl里头

private UserService userService;

public void setUserService(UserService userService) {
        this.userService= userService;
    }

你可能感兴趣的:(bean,xml)