docker
教程:https://www.runoob.com/docker/docker-container-usage.html 浅显易懂
换yum源
https://developer.aliyun.com/mirror/centos 官方->典中典
mybatis-plus获取最新创建的表,表名为时间名
mapper
@Mapper
public interface DatabaseInfoMapper extends BaseMapper<Object> {
@Select("SELECT table_name FROM information_schema.tables WHERE table_schema = 'hotsearch'")
List<String> findAllTableNames();
}
service
@Service
public class DatabaseInfoService {
private final DatabaseInfoMapper databaseInfoMapper;
public DatabaseInfoService(DatabaseInfoMapper databaseInfoMapper) {
this.databaseInfoMapper = databaseInfoMapper;
}
public List<String> getAllTableNames() {
return databaseInfoMapper.findAllTableNames();
}
}