application.yml
app:
vendor:
port:
ABL: 8300
MENEKIS: 5050
Spring
import org.springframework.boot.context.properties.ConfigurationProperties
@ConfigurationProperties("app.vendor")
data class VendorConfig(
private val port: Map<String, Int>
) {
fun getInterfacePort(vendorName: String): Int {
return port[vendorName] ?: 80
}
}