package com.service.impl;

import com.dao.StudentDao;
import com.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

//<bean id="studentService" class="com.service.impl.StudentServiceImpl">
@Service
public class StudentServiceImpl implements StudentService {
    @Value("${jdbc.url}")
    private String jddc;
//    <property name="studentDao" ref="studentDao"></property>
//    @Autowired
//    @Qualifier("studentDao") // 按照id名称值从容器中进行匹配 配合autowired一起使用
//    @Resource(name = "studentDao") // resource相当于 autowired+qualifier
    @Autowired
    private StudentDao studentDao;
    @Override
    public void showStudent() {
        studentDao.showStudent();
    }
}
