目前我使用的是payara-micro-4.1.2.174和microprofile-config-api.version 1.2.1,并注入了如下内容:
但总是获取http端口,而不是https端口。
"@Inject @ConfigProperty(name="payara.instance.https.port") int httpsPort;"为什么我得到的是http端口而不是https端口?
发布于 2018-03-13 02:13:09
默认情况下,Payara Micro不会启动SSL端口,您需要在命令行中使用--sslport指定它。Auto binding is also supported with the --autobindssl option。
一旦有了SSL端口,@ConfigProperty注入就应该可以工作了,如果没有,that would be a bug to be raised on GitHub就可以工作了。
https://stackoverflow.com/questions/49219231
复制相似问题