当我删除此方法时
secure(keyStoreLocation, keyStorePassword, null, null);
我可以访问我的网页:http://localhost:8080/index
当我添加:
secure(keyStoreLocation, keyStorePassword, null, null);
网页:https://localhost:8080/index没有显示,连接失败,请问我错过了什么?
谢谢。
我会尝试的第一件事是更改端口。大多数浏览器都会尝试通过8080端口进行http。试着用你的安全方法添加这个:
port(443);
secure(keyStoreLocation, keyStorePassword, null, null);
然后您必须使用https://localhost:443/index当然如果这不起作用,那么您的密钥库可能会出现问题。