What valid expression can the HTTP Request host value be set to so that it is no longer hardcoded?

Refer to the exhibits.

A Mule application has an HTTP Request that is configured with hardcoded values. To change this, the Mule application is configured to use a properties file named config.yaml.

What valid expression can the HTTP Request host value be set to so that it is no longer hardcoded?
A . ${training.host}
B . ${training:host}
C . #[training:host]
D . #[training.host]

Answer: A

Explanation:

Correct answer is ${training.host}

————————————————————————————————————————-

How to Configure Properties to Mule 4.X Platform?

1) Go to /src/main/resources project directory.

2) Create a configuration file with the name configuration.yaml inside the newly created config folder.

3) Go To Project > Global Element > Create > General >select the configuration.yaml file create in step- 2)

4) To verify develop a simple flow with HTTP listener which has above entries. Put the logger that prints the values on console.

5) Additional info: Similarly, when you want to access this port in DataWeave you need to use p function

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments