Followed this tutorial https://developer.ibm.com/messaging/2018/04/03/mq-jms-spring-boot/ and developed a Spring Boot JMS applicatin which sends a message to IBM MQ. (used this dependency - mq-jms-spring-boot-starter).
As per the tutorial, the configuration properties (Queue Manager, Channel, Port etc) can be given in application.yml/ application.properties file as below, and JmsTemplate will automatically be configured with the properties.
ibm.mq.queueManager=QM1
ibm.mq.channel=SYSTEM.DEF.SVRCONN
ibm.mq.connName=server.example.com(1414)
ibm.mq.user=user1
ibm.mq.password=passw0rd
The application works perfect and it sends message to the MQ now this way.
But I want to set the properties inside the class, not from the properties file (reading from a database or something). How to set these values inside the class?