couldnt resolve placeholder from the config

hey guys. i have this config:
    bankAccounts:
      - iban: "LT123"
        cashRegId: 2
      - iban: "LT345"
        cashRegId: 2

and i have this config:
@Component
@Configuration
@Getter
@Setter
public class BankAccountConfig {
    @Value("${bankAccounts}")
    private List<BankAccount> bankAccounts;
}

and the thing is that idk how to tell
@Value
that i want to have a list. bc rn i need to specify an element. intellij suggests me this:
    @Value("${bankAccounts[0].iban}")


any help? thx
Was this page helpful?