测试查询


Application 中增加注解 @MapperScan

@MapperScan(basePackages = "com.lusifer.spring.boot.mybatis.mapper")

JUnit 测试代码

@RunWith(SpringRunner.class)
@SpringBootTest
public class GamingServerDatabaseApplicationTests {
    @Autowired
    private ChannelMapper channelMapper;

    @Test
    public void contextLoads() {
        List<Channel> channels = channelMapper.selectAll();
        System.out.println(channels);
    }
}
Copyright 2021 all right reserved,powered by Gitbook该文件修订时间: 2018-05-03 01:12:15

results matching ""

    No results matching ""