```.beans.factory.BeanCreationException: Error cre...
# spring
f
Copy code
.beans.factory.BeanCreationException: Error creating bean with name 'cfProperties': Could not bind properties to CfProperties (prefix=cf, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'services' of bean class [com.cardinalhealth.mobius.mobiusorchestrator.cf.config.CfProperties$$EnhancerBySpringCGLIB$$d09a0c26]: Getter for property 'services' threw exception; nested exception is java.lang.reflect.InvocationTargetException
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
a
did you try without the custom getter?
f
Copy code
class ServiceVersions {
    lateinit var idm: ServiceVersion
    lateinit var zuul: ServiceVersion
    lateinit var mobius: ServiceVersion
    lateinit var inpower: ServiceVersion

}
class ServiceVersion {
    lateinit var dockerTag: String
    lateinit var mavenVersion: String
    lateinit var jarPath: String
}
no luck
Also realized I used
lateinit var services: ServiceVersion
instead of
lateinit var services: ServiceVersions
, but fixing that didn’t help
Figured it out
just had to initialize everything
Copy code
class CfProperties {
    lateinit var apiHost: String
    lateinit var organization: String
    lateinit var refreshToken: String
    lateinit var zuulVersion: String
    lateinit var idmVersion: String
    val services = ServiceVersions()
}

class ServiceVersions {
    var idm: ServiceVersion = ServiceVersion()
    var zuul: ServiceVersion = ServiceVersion()
    var mobius: ServiceVersion = ServiceVersion()
    var inpower: ServiceVersion = ServiceVersion()

}

class ServiceVersion {
    var dockerTag: String? = null
    var mavenVersion: String? = null
    var jarPath: String? = null
}
a
đź‘Ť