我尝试将https支持添加到我的春季网络服务中。
在我的application.properties中,我添加了:
server.ssl.key-store: tomcat.keystore
server.ssl.key-store-password: xxxxxx
server.ssl.key-password: XXXXX
然后我在启动服务时收到此错误消息:
org.springframework.context.ApplicationContextException: Unable to start embedded container;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]:
Initialization of bean failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'serverProperties':
Could not bind properties; nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'ssl[key-store-password]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]:
Cannot access indexed value in property referenced in indexed property path 'ssl[key-store-password]';
nested exception is org.springframework.beans.NotReadablePropertyException:
Invalid property 'ssl[key-store-password]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]:
Bean property 'ssl[key-store-password]' is not readable or has an invalid getter method:
Does the return type of the getter match the parameter type of the setter?
我应该从哪里开始调查?