简体   繁体   English

如何在application.properties上为Spring Boot Artemis配置SSL,用户名和密码?

[英]How do I configure SSL, username and password for Spring Boot Artemis on application.properties?

I'm using Spring Boot 1.3.1 and I can auto-configure my JMS components through application.properties. 我正在使用Spring Boot 1.3.1,并且可以通过application.properties自动配置我的JMS组件。

As I'm using Artemis as my message broker, I'm using spring-boot-starter-artemis, and as states the documentation in this link , all I have to do is replace the spring.hornetq.* properties and place spring.artemis.* instead. 当我使用Artemis作为消息代理时,我使用的是spring-boot-starter-artemis,并且声明此链接中的文档,所以我要做的就是替换spring.hornetq。*属性并放置spring。 artemis。*。

The problem is that it doesn't show how to configure the username, password and SSL configuration for HornetQ/Artemis. 问题在于它没有显示如何为HornetQ / Artemis配置用户名,密码和SSL配置。 I configured Artemis to use SSL and user/pass authentication like it's shown in here . 我配置阿蒂米斯使用SSL和用户名/密码认证像它显示在这里

Does anyone know what properties can I state to add SSL and user/pass? 有谁知道我可以声明哪些属性来添加SSL和用户/密码?

Thanks! 谢谢!

Spring Boot does not support such arrangement. Spring Boot不支持这种安排。 Not everything should happen via properties if you ask me but in any case a good way to find out is asking your IDE to auto-complete the keys for that namespace (you'll quickly find out there is nothing related to SSL and security in there). 如果您问我,并不是所有事情都应该通过属性发生,但是无论如何,找到一个好方法是让您的IDE自动完成该名称空间的密钥(您会很快发现其中没有与SSL和安全性相关的内容) )。 If you don't use an IDE, this appendix should help 如果您不使用IDE,则此附录应有所帮助

Okay, currently the Artemis Spring Boot starter is very basic, it really doesn't support clusters, SSL or client authentication. 好的,目前Artemis Spring Boot启动程序非常基础,它确实不支持集群,SSL或客户端身份验证。

Doing a quick look at the starter's source code in GitHub, in the ArtemisConnectionFactoryFactory.java file, at lines 127 and onwards, I will have to add the TransportConstants necessary to configure SSL, authentication, etc. 快速浏览一下GitHub中Starter的源代码,位于ArtemisConnectionFactoryFactory.java文件的第127行及以后的行中,我将必须添加配置SSL,身份验证等必需的TransportConstants。

An example of a more complete connection configuration is in Artemis' test source code, in CoreClientOverTwoWaySSLTest.java , on lines 178 and onwards, there is a really complete connection setup, so to contribute, I have to change the Artemis auto-configuration properties to take the new property options, and add them all to ArtemisConnectionFactoryFactory.java following the example in CoreClientOverTwoWaySSLTest.java 在Artemis的测试源代码中,在CoreClientOverTwoWaySSLTest.java中 ,在第178行及以后的代码中,有一个更完整的连接配置示例,它确实具有完整的连接设置,因此,我必须将Artemis的自动配置属性更改为采取新的属性选项,并按照CoreClientOverTwoWaySSLTest.java中的示例将其全部添加到ArtemisConnectionFactoryFactory.java中。

I'll do a fork on the starter, make the modifications, and figure out what bureaucracy is needed to submit a pull request and get it accepted on spring-boot. 我将在启动程序上进行分叉,进行修改,并确定提交拉取请求并在春季启动时被接受所需的官僚作风。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 "如何在 application.properties 文件中的 Spring Boot 应用程序中配置 HikariCP?" - How do I configure HikariCP in my Spring Boot app in my application.properties files? 在用于spring boot之前,我如何首先在application.properties中解密密码 - How do I KMS decrypt the password in the application.properties first before being used in spring boot Spring Boot 2:如何使用application.properties文件配置HikariCP - Spring Boot 2: How to configure HikariCP using application.properties file spring开机时如何通过application.properties配置CommonErrorHandler和ContainerProperties? - How to configure CommonErrorHandler and ContainerProperties through application.properties in spring boot? 我应该如何配置application.properties以在春季启动时连接Azure SQL数据库? - How should I configure application.properties to connect Azure SQL database in spring boot? 如何在 Spring Boot 应用程序的 application.properties 文件中设置 MyBatis 配置属性? - How do I set MyBatis configuration properties in an application.properties file in a Spring Boot application? 如何在 spring application.properties 中指定我的 ssl 密钥库文件的本地文件路径? - How do I specify local file path to my ssl keystore file in spring application.properties? 如何以编程方式覆盖 Spring Boot application.properties? - How can I override Spring Boot application.properties programmatically? Spring Boot无法从application.properties加载用户名 - Spring Boot not loading username from application.properties 如何将 Spring Data JPA 正确配置到 Spring Boot 2.X 应用程序的 application.properties 配置文件中? - How to correctly configure Spring Data JPA into the application.properties configuration file of a Spring Boot 2.X application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM