I am getting this error :
APPLICATION FAILED TO START
***************************
Description:
Configuration property name 'appConfig.baseVersion' is not valid:
Invalid characters: 'C'
Bean: paymentCheckoutRequestBuilder
Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter
Action:
Modify 'appConfig.baseVersion' so that it conforms to the canonical names requirements.
paymentCheckoutRequestBuilder is a bean of class PaymentCheckoutRequestBuilder. How am I supposed to fix this , you cannot name a class in kebab-case.
Also, this error occurred after I tried upgrading my spring-boot to 2.2.0.
And what is this appConfig.baseVersion , not able to find anything online.
this is self explanatory: Reason: Canonical names should be kebab-case Pay attention, that @ConfigurationProperties should not be in camel-case. So you should fix prefix on @ConfigurationProperties for your target bean.
property appConfig.baseVersion is in camel case so you should use use prefix in configuration as shown below
mqConfig:
enable: false
then your Configuration file must have @ConfigurationProperties(prefix = "mq-config")
For current example the application.yaml should be
appConfig:
baseVersion: 1
And java class should be
@Configuration
@ConfigurationProperties(prefix = "app-config")
public class TestConfig {
int baseVersion;
}
And the
I figured it out. For a long time I thought the problem was with paymentCheckoutRequestBuilder
. The real problem was with appConfig.baseVersion
which is defined as prefix in one of @ConfigurationProperties
annotated class. I changed the name and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With