我面临一个问题,我在我的代码中使用 UrlValidator。
UrlValidator urlValidator = UrlValidator.getInstance();
if(urlValidator.isValid(url)) {
throw new IllegalArgumentException( url + "not valid");
}
where url i'm passing is
[1]: http://localhost:8080/myapp/Education.html
.IllegalArgumentException n 如果我传递 url 即
[2]: https://www.google.co.in/
它工作正常。如何使此代码适用于 localhost:8080