尝试使用 url 时,我得到 URI 不能为空
下面是我的代码,
HttpService.setSslSecurityProtocol(SSLSecurityProtocol.SSLv3);
//Tried the below one also
//HttpService.setSslSecurityProtocol(SSLSecurityProtocol.TLSv1_2);
ServiceArgs loginArgs = new ServiceArgs();
loginArgs.setUsername("username");
loginArgs.setPassword("password");
loginArgs.setHost("my splunk url"); //for eg http://splunkdet.mysite.com:8000/login
loginArgs.setPort(8000);
Service service = Service.connect(loginArgs);
for (Application app: service.getApplications().values()) {
System.out.println(app.getName());
}
获取异常“ URI 不能为空”Service service = Service.connect(loginArgs);
我的代码有什么问题?