package com.sf.ioc.service.impl;


import com.sf.ioc.mapper.UserMapper;
import com.sf.ioc.service.UserService;

/**
 * @author WanJl
 * @version 1.0
 * @title UserServiceImpl
 * @description
 * @create 2025/11/23
 */
public class UserServiceImpl implements UserService {


    //构造方法
    public UserServiceImpl() {
        System.out.println("userService的构造方法.....");
    }


    //要使用userMapper
    private UserMapper userMapper;

    /**
     * 为UserMapper增加set方法
     * @param userMapper
     */
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
    @Override
    public void print() {
        userMapper.login();
        System.out.println("UserServiceImpl......");
    }
}
