spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.19k stars 40.69k forks source link

Constructor binding for nested class with multiple constructors causes BindException #31860

Closed Geogy-fjq closed 2 years ago

Geogy-fjq commented 2 years ago

I integrated the third-party configuration class and deployed the project as a war package to the application server (= When JndiPropertySource is enabled), the configuration property binding does not work.

Versions

I am using V2.5.8,but I think this issue was introduced in V.2.4.0-M3(https://github.com/spring-projects/spring-boot/releases/tag/v2.4.0-M3)

StackTrace

Failed to bind properties under 'mybatis.configuration.mapped-statements[0].parameter-map.parameter-mappings[0]' to org.apache.ibatis.mapping.ParameterMapping:

    Reason: java.lang.IllegalStateException: Failed to extract parameter names for org.apache.ibatis.mapping.ParameterMapping(org.apache.ibatis.mapping.ParameterMapping$1)

Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'mybatis.configuration.mapped-statements[0].parameter-map.parameter-mappings[0]' to org.apache.ibatis.mapping.ParameterMapping
        at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:384) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:344) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$null$1(Binder.java:432) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withSource(Binder.java:563) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$700(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:433) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:106) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:86) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:70) ~[?:?]
        at org.springframework.boot.context.properties.bind.CollectionBinder.bindAggregate(CollectionBinder.java:49) ~[?:?]
        at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:56) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$3(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$100(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:396) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$null$1(Binder.java:432) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withSource(Binder.java:563) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$700(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:433) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:106) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:86) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:70) ~[?:?]
        at org.springframework.boot.context.properties.bind.CollectionBinder.bindAggregate(CollectionBinder.java:49) ~[?:?]
        at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:56) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$3(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$100(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:396) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:329) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:259) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:220) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:207) ~[?:?]
        at com.support.datasource.mybatis.MybatisAutoConfig.createSqlSessionFactory(MybatisAutoConfig.java:189) ~[?:?]
        at com.support.datasource.mybatis.MybatisAutoConfig.sqlSessionFactoryMap(MybatisAutoConfig.java:178) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[?:?]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[?:?]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1519) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1417) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[?:?]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[?:?]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[?:?]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[?:?]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[?:?]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[?:?]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97) ~[?:?]
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174) ~[?:?]
        at com.szkingdom.kwas.kcontainer.core.StandardContext.startInternal(StandardContext.java:5209) ~[kwas-core.jar:?]
        at com.szkingdom.kwas.kcontainer.util.LifecycleBase.start(LifecycleBase.java:173) ~[kwas-core.jar:?]
        at com.szkingdom.kwas.kcontainer.core.ContainerBase.addChildInternal(ContainerBase.java:716) ~[kwas-core.jar:?]
        ... 37 more
Caused by: java.lang.IllegalStateException: Failed to extract parameter names for org.apache.ibatis.mapping.ParameterMapping(org.apache.ibatis.mapping.ParameterMapping$1)
        at org.springframework.util.Assert.state(Assert.java:97) ~[?:?]
        at org.springframework.boot.context.properties.bind.ValueObjectBinder$DefaultValueObject.parseConstructorParameters(ValueObjectBinder.java:255) ~[?:?]
        at org.springframework.boot.context.properties.bind.ValueObjectBinder$DefaultValueObject.<init>(ValueObjectBinder.java:249) ~[?:?]
        at org.springframework.boot.context.properties.bind.ValueObjectBinder$DefaultValueObject.get(ValueObjectBinder.java:276) ~[?:?]
        at org.springframework.boot.context.properties.bind.ValueObjectBinder$ValueObject.get(ValueObjectBinder.java:183) ~[?:?]
        at org.springframework.boot.context.properties.bind.ValueObjectBinder.bind(ValueObjectBinder.java:64) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$null$1(Binder.java:432) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withSource(Binder.java:563) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$700(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:433) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:106) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:86) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:70) ~[?:?]
        at org.springframework.boot.context.properties.bind.CollectionBinder.bindAggregate(CollectionBinder.java:49) ~[?:?]
        at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:56) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$3(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$100(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:396) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$null$1(Binder.java:432) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withSource(Binder.java:563) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$700(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:433) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:106) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:86) ~[?:?]
        at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:70) ~[?:?]
        at org.springframework.boot.context.properties.bind.CollectionBinder.bindAggregate(CollectionBinder.java:49) ~[?:?]
        at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:56) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$3(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$100(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:435) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:396) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83) ~[?:?]
        at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:329) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:259) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:220) ~[?:?]
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:207) ~[?:?]
        at com.support.datasource.mybatis.MybatisAutoConfig.createSqlSessionFactory(MybatisAutoConfig.java:189) ~[?:?]
        at com.support.datasource.mybatis.MybatisAutoConfig.sqlSessionFactoryMap(MybatisAutoConfig.java:178) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[?:?]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[?:?]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1519) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1417) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[?:?]
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[?:?]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[?:?]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[?:?]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[?:?]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[?:?]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[?:?]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[?:?]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[?:?]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[?:?]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[?:?]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[?:?]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[?:?]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155) ~[?:?]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97) ~[?:?]
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174) ~[?:?]
        at com.szkingdom.kwas.kcontainer.core.StandardContext.startInternal(StandardContext.java:5209) ~[kwas-core.jar:?]
        at com.szkingdom.kwas.kcontainer.util.LifecycleBase.start(LifecycleBase.java:173) ~[kwas-core.jar:?]
        at com.szkingdom.kwas.kcontainer.core.ContainerBase.addChildInternal(ContainerBase.java:716) ~[kwas-core.jar:?]
        ... 37 more

details

I think the issue I encountered is highly similar to it(https://github.com/spring-projects/spring-boot/issues/18670), and the issue has been fixed in V2.2.1.RELEASE(https://github.com/spring-projects/spring-boot/releases/tag/v2.2.1.RELEASE). I guess the issue was brought back to spring from this version(https://github.com/spring-projects/spring-boot/releases/tag/v2.4.0-M3).

wilkinsona commented 2 years ago

Thanks for the report. Spring Boot 2.5.x is no longer supported. Please upgrade to Spring Boot 2.6.x or 2.7.x. If the problem still occurs and you would like us to investigate, please provide a complete yet minimal sample that reproduces the problem.

spring-projects-issues commented 2 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 2 years ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.