为SSL配置Wildfly Swarm [英] Configure Wildfly Swarm for SSL
问题描述
我尝试将Wildfly Swarm配置为使用SSL启用HTTPS连接.我的应用程序只有一个REST API端点(JAX-RS).通过使用standalone.xml进行配置,我找到了一些有关经典Wildfy的信息. 我知道我也可以使用standalone.xml,但是我不确定是否可以将此配置也放入project-defaults.yml中.
I try to configure Wildfly Swarm to use SSL to enable HTTPS Connections. My Application has only an REST API Endpoint (JAX-RS). I found some information about classic Wildfy, using the standalone.xml for configuration. I understand that I could use standalone.xml as well, but I am not sure if I can put this configuration ind the project-defaults.yml as well.
推荐答案
肯定可以在project-defaults.yml
中配置SSL.我在这里有一个示例项目: https://github .com/Ladicek/swarm-test-suite/tree/master/protocols/https .它不使用JAX-RS,仅使用Servlet,但应该足够.
Configuring SSL in project-defaults.yml
is definitely possible. I have an example project doing this here: https://github.com/Ladicek/swarm-test-suite/tree/master/protocols/https. It doesn't use JAX-RS, merely Servlet, but should be enough.
project-defaults.yml
的相关部分如下所示:
The relevant part of project-defaults.yml
looks like this:
swarm:
https:
keystore:
path: ${project.build.directory}/keystore.jks
password: password
key:
alias: httpskey
password: password
如果您的密钥库包含一个单个项,其密码与密钥库密码相同,则不需要key.alias
和
if you have a keystore with a single entry whose password is the same as the keystore password, you don't need the key.alias
and key.password
properties. In such case, this would be perfectly enough:
swarm:
https:
keystore:
path: ${project.build.directory}/keystore.jks
password: password
(在示例项目中实际上就是这种情况,因此您可以克隆它并尝试:-))
(This is actually the case in the example project, so you can clone it and try :-) )
这篇关于为SSL配置Wildfly Swarm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!