我正在尝试根据Spring WS - HTTPS Client-Server Example中的说明为我的Spring Boot App启用HTTPS。密钥库文件PREFIX qb: <http://purl.org/linked-data/cube#>
SELECT DISTINCT ?subject
WHERE
{
?a qb:component ?subject .
FILTER regex(str(?subject), "p", "i")
}
是使用server-keystore.jks
生成的,并与keytool
一起放在项目的/ src / main / resources中。在application.properties
中,我有以下内容:
application.properties
当我在Eclipse中启动Spring Boot Application时,它会立即失败并出现以下错误:
server.port=9443
server.ssl.key-store=classpath:server-keystore.jks
server.ssl.key-store-password=123456
server.ssl.keyAlias=server-keypair
server.ssl.key-store-type=JKS
如果我在java.io.FileNotFoundException: class path resource [server-keystore.jks] cannot be resolved to URL because it does not exist
classpath
之前移除server-keystore.jks
,则启动过程会持续一段时间,但最终会失败
application.properties
FileNotFoundException: project-root-dir\server-keystore.jks (The system cannot find the file specified)
是我项目的根路径。如何让Spring Boot知道此cert文件的位置?