问题遇到的现象和发生背景 运行测试类报这个错是咋了呀
用代码块功能插入代码,请勿粘贴截图
package com.yy.store.mapper;
import com.yy.store.entity.Address;
import com.yy.store.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Date;
//表示当前类是一个测试类 不会随同项目一起打包
@SpringBootTest
@RunWith(SpringRunner.class)
public class AddressMapperTests {
@Autowired
private AddressMapper addressMapper;
@Test
public void insert(){
Address address = new Address();
address.setUid(12);
address.setPhone("123333333333");
address.setName("wzy");
addressMapper.insert(address);
}
}