Turns out, I was missing the kotlin-reflect dependency
https://gitter.im/spring-projects/spring-boot?at=5de9385a08d0c961b7f7758a
But the failure isn't handled well by Spring Boot
When I run the ConfigurationPropertiesTest, I get:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'push1-ind.ericjturley.mcve.configurationproperties.PushServicesProperties1': Unsatisfied dependency expressed through constructor parameter 0; nested exception is ...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'ind.ericjturley.mcve.configurationproperties.PushServicesProperties1$SnsClient' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Looks like commenting out @ConfigurationProperties on the .kt class PushServiceProperties1 will toggle the failure.
(I had originally thought it was the injection into the test class)
These classes are pulled from an existing project (and possibly renamed).
The project is a library intended for use in a Spring Boot Application.
Hence, it doesn't have spring-boot-starter-parent as a parent, but does:
- import the
spring-boot-dependenciesbom - depend on
spring-boot-starter
It's mostly Java, with a few Kotlin classes/files.