Java 创建spring boot ConfigurationProperties映射时的空指针<;字符串,对象>;

Java 创建spring boot ConfigurationProperties映射时的空指针<;字符串,对象>;,java,spring,properties,spring-boot,Java,Spring,Properties,Spring Boot,我在创建spring boot ConfigurationProperties映射时遇到空指针异常。properties类是 @Component @ConfigurationProperties(prefix = "thing") public class ThingProperties { private Map<String, ThingLayout> layouts; public Map<String, ThingLayout> getLayouts()

我在创建spring boot ConfigurationProperties映射时遇到空指针异常。properties类是

@Component
@ConfigurationProperties(prefix = "thing")
public class ThingProperties {

 private Map<String, ThingLayout> layouts;

 public Map<String, ThingLayout> getLayouts() {
     return layouts == null ? new HashMap<>() : layouts;
 }

 public void setLayouts(final Map<String, ThingLayout> layouts) {
     this.layouts = new HashMap(layouts);
 }
}
这样做的目的是,属性将被绑定,我将能够执行以下操作

thingProperties.getLayouts().get(3042).getItemX();
我得到的例外是

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'thingProperties': Could not bind properties to ThingProperties (prefix=things, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is java.lang.IllegalArgumentException: Target object must not be null
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:339) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:289) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 47 common frames omitted
Caused by: java.lang.IllegalArgumentException: Target object must not be null
at org.springframework.util.Assert.notNull(Assert.java:115) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.setWrappedInstance(AbstractNestablePropertyAccessor.java:205) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:138) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.<init>(AbstractNestablePropertyAccessor.java:165) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:131) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:223) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:63) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getNestedPropertyAccessor(AbstractNestablePropertyAccessor.java:853) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyAccessorForPropertyPath(AbstractNestablePropertyAccessor.java:813) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:724) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyType(AbstractNestablePropertyAccessor.java:485) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.resolvePropertyName(RelaxedDataBinder.java:421) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.getActualPropertyName(RelaxedDataBinder.java:385) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:273) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:308) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:308) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.normalizePath(RelaxedDataBinder.java:259) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.modifyProperty(RelaxedDataBinder.java:240) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.modifyProperties(RelaxedDataBinder.java:155) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.validation.DataBinder.bind(DataBinder.java:715) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:269) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:241) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:334) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
... 61 common frames omitted
原因:org.springframework.beans.factory.BeanCreationException:创建名为“thingProperties”的bean时出错:无法将属性绑定到thingProperties(前缀=things,ignoreInvalidFields=false,ignoreUnknownFields=true,ignoreNestedProperties=false);嵌套异常为java.lang.IllegalArgumentException:目标对象不能为null
在org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.PostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:339)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.PostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:289)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.DefaultListableBeanFactory.Findautowire候选者(DefaultListableBeanFactory.java:1192)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 省略47个公共框架
原因:java.lang.IllegalArgumentException:目标对象不能为null
在org.springframework.util.Assert.notNull(Assert.java:115)~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.setWrappedInstance(AbstractNestablePropertyAccessor.java:205)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:138)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.(AbstractNestablePropertyAccessor.java:165)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.BeanWrapperImpl.(BeanWrapperImpl.java:131)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:223)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:63)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.getNestedPropertyAccessor(AbstractNestablePropertyAccessor.java:853)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyAccessorForPropertyPath(AbstractNestablePropertyAccessor.java:813)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:724)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyType(AbstractNestablePropertyAccessor.java:485)~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
在org.springframework.boot.bind.RelaxedDataBinder.resolvePropertyName(RelaxedDataBinder.java:421)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.boot.bind.RelaxedDataBinder.getActualPropertyName(RelaxedDataBinder.java:385)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.boot.bind.relaxedatabinder.initializePath(relaxedatabinder.java:273)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.boot.bind.relaxedatabinder.initializePath(relaxedatabinder.java:308)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
在org.springframework.boot.bind.relaxedatabinder.initializePath(relaxedatabinder.java:308)~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
位于org.springframework.boot.bind.relaxedatabinder.normalizePath(Re
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'thingProperties': Could not bind properties to ThingProperties (prefix=things, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is java.lang.IllegalArgumentException: Target object must not be null
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:339) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:289) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 47 common frames omitted
Caused by: java.lang.IllegalArgumentException: Target object must not be null
at org.springframework.util.Assert.notNull(Assert.java:115) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.setWrappedInstance(AbstractNestablePropertyAccessor.java:205) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:138) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.<init>(AbstractNestablePropertyAccessor.java:165) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:131) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:223) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.BeanWrapperImpl.newNestedPropertyAccessor(BeanWrapperImpl.java:63) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getNestedPropertyAccessor(AbstractNestablePropertyAccessor.java:853) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyAccessorForPropertyPath(AbstractNestablePropertyAccessor.java:813) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:724) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyType(AbstractNestablePropertyAccessor.java:485) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.resolvePropertyName(RelaxedDataBinder.java:421) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.getActualPropertyName(RelaxedDataBinder.java:385) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:273) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:308) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:308) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.normalizePath(RelaxedDataBinder.java:259) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.modifyProperty(RelaxedDataBinder.java:240) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.modifyProperties(RelaxedDataBinder.java:155) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.validation.DataBinder.bind(DataBinder.java:715) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:269) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:241) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:334) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
... 61 common frames omitted
@Component
@ConfigurationProperties(prefix = "thing")
public class ThingProperties {

 private Map<String, ThingLayout> layouts = new HashMap<>();

 public Map<String, ThingLayout> getLayouts() {
     return layouts;
 }

 public void setLayouts(final Map<String, ThingLayout> layouts) {
     this.layouts = new HashMap(layouts);
 }
}
org.springframework.beans.AbstractNestablePropertyAccessor#setDefaultValue(org.springframework.beans.AbstractNestablePropertyAccessor.PropertyTokenHolder)
org.springframework.beans.AbstractNestablePropertyAccessor#setPropertyValue(org.springframework.beans.AbstractNestablePropertyAccessor.PropertyTokenHolder, org.springframework.beans.PropertyValue)