How to store keystores in profile and accessing it in Spring context ?

Solution Unverified - Updated -

Issue

  • We noticed that the mq-default profile has io.fabric8.mq.fabric.server-broker.properties file with property keystore.url=profile\:keystore.jks.
  • We would like to also place our keystores in our profiles and be able to access them from our Spring config.
  • We have defined the property in a property file in the profile like this:
keystore=profile\:keystore.jks
  • And this is propagated to the Spring context and used with the following:
<sec:keyManagers keyPassword="changeit">
    <sec:keyStore type="JKS" password="changeit" file="${keystore}"/>
</sec:keyManagers>
  • But we get
java.io.FileNotFoundException: profile:keystore.jks

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.