Read java property inside application.yml file spring boot

I need to read a property from a bean class into application.yml file. For instance,

i have a class as below.

public class Customer {

private String customerId;

private String name;

}

application.yml

prop:

name:${name}

customerId:${customerId}

in the above case name and customerId comes from bankend response, I want to replace ${name} and ${customerId} with those values. Later , i want to read these values from

application.yml file. In my case application.yml file is externalized using config server. Do we have a solution for this? Kindly help me....

Read More »

By: StackOverFlow - 5 days ago

Related Posts