支持 SSL 的 Artemis ActiveMQ 配置

Artemis ActiveMQ configuration with SSL support

我正在尝试使用 SSL 设置 Artemis

我的 etc/bootstrap.xml 文件看起来像:

<broker xmlns="http://activemq.org/schema">
   <web bind="https://0.0.0.0:8161" path="web" keystorePath="keystore.p12" keystorePassword="123" truststorePath="trusstore.p12" truststorePassword="123">
      <app url="activemq-branding" war="activemq-branding.war"/>
      <app url="artemis-plugin" war="artemis-plugin.war"/>
      <app url="console" war="console.war"/>
   </web>
</broker>

我确实喜欢它是用 the documentation 编写的,但是当我 运行 artemis 服务时,我收到错误消息:

javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 188; cvc-complex-type.3.2.2: Attribute 'keystorePath' is not allowed to appear in element 'web'.]

我不明白我做错了什么?

JAXB 解组区分大小写,因此您可以通过替换以下属性名称来修复此错误:keystorePath > keyStorePath、keystorePassword > keyStorePassword、truststorePath > trustStorePath 和 truststorePassword > trustStorePassword。

<broker xmlns="http://activemq.org/schema">
   <jaas-security domain="activemq"/>

   <server configuration="file:/home/dbruscin/Workspace/temp/apache-artemis-2.11.0/broker/etc//broker.xml"/>

   <web bind="https://0.0.0.0:8161" path="web" keyStorePath="keystore.p12" keyStorePassword="123" trustStorePath="trusstore.p12" trustStorePassword="123">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>
</broker>