I have a "details.yml" file, considering all the setting for getting all values from "yml.file" is done. But I am unable to store Map values into "Map"
Here is my "details.yml" file below
details:
company:XYZ
values:
name: Manish
last: Raut
And in my class file i am able to get the values of "company" from yml file using @Value("${company}")
@Component
@EnableConfigurationProperties
@ConfigurationProperties(prefix = "details")
public class abcd() {
@Value("${company}")
String company;
@Value("${values}")
Map<String, String> values =new HashMap<String, String>();
...............................
}
i am not able to get those values in Mao which i created in this class, but i am getting values for "Company".
Help me with this?