package com.service.impl;
import com.dao.impl.AccountDaoImpl;
import com.dao.IAccountDao;
import com.service.*;
import org.springframework.stereotype.Component;
@Component(value = "accountService")//在此处自定义id
public class AccountServiceImpl implements IAccountService {
private IAccountDao accountDao = new AccountDaoImpl();
public AccountServiceImpl(){
System.out.println("对象创建了");
}
@Override
public void saveAccount() {
accountDao.save();
}
}
/**
* 账户业务层实现类
* 曾经xml配置:
* <bean id="accountService" class = "com.service.impl.AccountServiceImpl"
* scope=" " init-method=" " destroy-method=" ">
* <property name="" value=" "|ref=" "></property>
* </bean>
*
*