spring mybatis dao是怎么注入的
1个回答
展开全部
PersonMapper这个接口的实现对象没有注入!
我的servicer接口实现类代码:
@Service("personService")
public class PersonServiceImpl implements IPersonService {
@Autowired
private PersonMapper personMapper;
@Override
public Person queryById(Integer id) {
return this.personMapper.selectByPrimaryKey(id);
}
我的servicer接口实现类代码:
@Service("personService")
public class PersonServiceImpl implements IPersonService {
@Autowired
private PersonMapper personMapper;
@Override
public Person queryById(Integer id) {
return this.personMapper.selectByPrimaryKey(id);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询