package com.kwan.springbootkwan.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.kwan.springbootkwan.entity.Person; import com.kwan.springbootkwan.mapper.PersonMapper; import com.kwan.springbootkwan.service.IPersonService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements IPersonService { @Autowired private PersonMapper personMapper;
@DS(value = "ali-ds")
@Override public Person savePerson(Person person) { personMapper.insert(person);
// final int i = 1 / 0;
return person; } }