whyclxw
2021-04-16 cd3982f1435ac05296120db197664d469604e244
src/test/java/com/example/lxw/MpperTest.java
@@ -6,26 +6,24 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author lxw
 * @create 2021-04-14 10:20
 */
@SpringBootTest
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MpperTest {
    @Resource
    private User_InfMapper mapper;
   @Autowired
    private User_InfMapper user_infMapper;
    @Test
    public void searchAll(){
        List<User_inf> list= mapper.selectList(new QueryWrapper<>());
        List<User_inf> list= user_infMapper.selectList(new QueryWrapper<>());
        list.forEach(uinf-> System.out.println(uinf.toString()));
    }
    @Test