首页 > 解决方案 > 无法绑定“spring.jackson.deserialization”下的属性

问题描述

当我开始我的项目在 Tomcat 上部署时,我收到错误消息

说明:无法将“spring.jackson.deserialization”下的属性绑定到 java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>:原因:找不到能够从类型 [java] 转换的转换器.lang.String] 输入 [java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>] 操作:

更新应用程序的配置

我的 application.properties 是空的

由 gradle 构建的项目。

构建.gradle

    plugins {
        id 'org.springframework.boot' version '2.3.2.RELEASE'
        id 'io.spring.dependency-management' version '1.0.9.RELEASE'
        id 'java'
        id 'war'
    }
    group = 'com.ladon'
    version = '0.0.1'
    sourceCompatibility = '11'
    repositories {
        mavenCentral()
    }
    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        runtimeOnly 'com.h2database:h2'
        runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc'
        runtimeOnly 'mysql:mysql-connector-java'
        runtimeOnly 'org.apache.derby:derby'
        runtimeOnly 'org.postgresql:postgresql'
    
        compileOnly 'org.projectlombok:lombok:1.18.12'
        annotationProcessor 'org.projectlombok:lombok:1.18.12'
        testCompileOnly 'org.projectlombok:lombok:1.18.12'
        testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
        providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
        testImplementation('org.springframework.boot:spring-boot-starter-test') {
            exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
        }
    }
    
    test {
        useJUnitPlatform()
    }
    package com.ladon.jsonserver;
    
    import org.springframework.boot.builder.SpringApplicationBuilder;
    import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
    
    public class ServletInitializer extends SpringBootServletInitializer {
    
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(JsonserverApplication.class);
    }
    
    }

    package com.ladon.jsonserver;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    
    @SpringBootApplication
    public class JsonserverApplication {
    
        public static void main(String[] args) {
            SpringApplication.run(JsonserverApplication.class, args);
        }
    
    }


    package com.ladon.jsonserver.structure;
    
        import com.fasterxml.jackson.annotation.JsonIgnore;
        import com.fasterxml.jackson.annotation.JsonInclude;
        import com.fasterxml.jackson.annotation.JsonProperty;
        import com.fasterxml.jackson.annotation.JsonPropertyOrder;
        import lombok.Data;
        import java.util.HashMap;
        import java.util.List;
        import java.util.Map;
    
        @JsonInclude(JsonInclude.Include.NON_NULL)
        @JsonPropertyOrder({
            "ACTIONS",
            "EcrSN",
            "Group",
            "ErrorCode",
            "ErrorCodeMessage"
        })
        public @Data class DeviceStatusUpdateResponse {
    
            @JsonProperty("ACTIONS")
            private List<DeviceStatusUpdateACTIONSResponse> aCTIONS = null;
            @JsonProperty("EcrSN")
            private Integer ecrSN;
            @JsonProperty("Group")
            private String group;
            @JsonProperty("ErrorCode")
            private Integer errorCode;
            @JsonProperty("ErrorCodeMessage")
            private String errorCodeMessage;
            @JsonIgnore
            private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    
            public DeviceStatusUpdateResponse() {
            }
    
    
        }


    package com.ladon.jsonserver.structure;
    
    
        import java.io.Serializable;
        import java.util.HashMap;
        import java.util.List;
        import java.util.Map;
        import com.fasterxml.jackson.annotation.JsonIgnore;
        import com.fasterxml.jackson.annotation.JsonInclude;
        import com.fasterxml.jackson.annotation.JsonProperty;
        import com.fasterxml.jackson.annotation.JsonPropertyOrder;
        import lombok.Data;
    
        @JsonInclude(JsonInclude.Include.NON_NULL)
        @JsonPropertyOrder({
            "TypeId",
            "Id",
            "CreationTimestamp",
            "ExecutionTimestamp",
            "Note",
            "DownloadURL",
            "DeployType",
            "NewEcrFwVersion",
            "NewEcrFwVersionDescription",
            "MD",
            "CMD"
        })
        public @Data class DeviceStatusUpdateACTIONSResponse implements Serializable {
    
            @JsonProperty("TypeId")
            private Integer typeId;
            @JsonProperty("Id")
            private Integer id;
            @JsonProperty("CreationTimestamp")
            private String creationTimestamp;
            @JsonProperty("ExecutionTimestamp")
            private String executionTimestamp;
            @JsonProperty("Note")
            private String note;
            @JsonProperty("DownloadURL")
            private String downloadURL;
            @JsonProperty("DeployType")
            private String deployType;
            @JsonProperty("NewEcrFwVersion")
            private Integer newEcrFwVersion;
            @JsonProperty("NewEcrFwVersionDescription")
            private String newEcrFwVersionDescription;
            @JsonProperty("MD")
            private String mD;
            @JsonProperty("CMD")
            private List<DeviceStatusUpdateACTIONSCMDResponse> cMD = null;
            @JsonIgnore
            private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    
    
            public DeviceStatusUpdateACTIONSResponse() {
            }
    
            /**
         *
         * @param note
         * @param newEcrFwVersionDescription
         * @param newEcrFwVersion
         * @param mD
         * @param creationTimestamp
         * @param downloadURL
         * @param typeId
         * @param id
         * @param cMD
         * @param deployType
         * @param executionTimestamp
         */
            public DeviceStatusUpdateACTIONSResponse(Integer typeId, Integer id, String creationTimestamp, String executionTimestamp, String note, String downloadURL, String deployType, Integer newEcrFwVersion, String newEcrFwVersionDescription, String mD, List<DeviceStatusUpdateACTIONSCMDResponse> cMD) {
                super();
                this.typeId = typeId;
                this.id = id;
                this.creationTimestamp = creationTimestamp;
                this.executionTimestamp = executionTimestamp;
                this.note = note;
                this.downloadURL = downloadURL;
                this.deployType = deployType;
                this.newEcrFwVersion = newEcrFwVersion;
                this.newEcrFwVersionDescription = newEcrFwVersionDescription;
                this.mD = mD;
                this.cMD = cMD;
            }
        }


    package com.ladon.jsonserver.structure;
    
        import java.io.Serializable;
        import java.util.HashMap;
        import java.util.Map;
        import com.fasterxml.jackson.annotation.JsonIgnore;
        import com.fasterxml.jackson.annotation.JsonInclude;
        import com.fasterxml.jackson.annotation.JsonProperty;
        import com.fasterxml.jackson.annotation.JsonPropertyOrder;
        import lombok.Data;
    
    
        @JsonInclude(JsonInclude.Include.NON_NULL)
        @JsonPropertyOrder({
            "CmdId",
            "Commandd",
            "Psw",
            "Body",
            "ExtendedDeviceStatus",
            "OnlyIfPreviousOk",
            "StateExe"
        })
        public @Data class DeviceStatusUpdateACTIONSCMDResponse implements Serializable {
    
            @JsonProperty("CmdId")
            private Integer cmdId;
            @JsonProperty("Commandd")
            private String commandd;
            @JsonProperty("Psw")
            private Integer psw;
            @JsonProperty("Body")
            private String body;
            @JsonProperty("ExtendedDeviceStatus")
            private Integer extendedDeviceStatus;
            @JsonProperty("OnlyIfPreviousOk")
            private Boolean onlyIfPreviousOk;
            @JsonProperty("StateExe")
            private Integer stateExe;
            @JsonIgnore
            private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    
            public DeviceStatusUpdateACTIONSCMDResponse() {
            }
            public DeviceStatusUpdateACTIONSCMDResponse(Integer cmdId, String commandd, Integer psw, String body, Integer extendedDeviceStatus, Boolean onlyIfPreviousOk, Integer stateExe) {
                super();
                this.cmdId = cmdId;
                this.commandd = commandd;
                this.psw = psw;
                this.body = body;
                this.extendedDeviceStatus = extendedDeviceStatus;
                this.onlyIfPreviousOk = onlyIfPreviousOk;
                this.stateExe = stateExe;
            }
        }


    package com.ladon.jsonserver.controller;
    
        import com.ladon.jsonserver.structure.DeviceStatusUpdateResponse;
        import org.springframework.http.HttpStatus;
        import org.springframework.http.MediaType;
        import org.springframework.web.bind.annotation.*;
    
        @RestController
        @RequestMapping("/RemoteControl")
        public class DeviceStatusUpdateResponseController {
    
            @ResponseBody
            @ResponseStatus(value = HttpStatus.OK)
            @RequestMapping(value = "/UpdateDeviceStatus/{sernum}",produces = MediaType.APPLICATION_JSON_VALUE)
            public DeviceStatusUpdateResponse DeviceStatusUpdateResponse(@PathVariable("sernum") long sernum)
            {
                DeviceStatusUpdateResponse device = new DeviceStatusUpdateResponse();
    
                return device;
            }
        }

我的错误在哪里?

标签: javaspringjackson

解决方案


新错误


***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>:

    Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>]

Action:

Update your application's configuration

31-Jul-2020 11:34:21.283 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [manageApp]
    java.lang.IllegalStateException: Error starting child
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1727)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageConverters' defined in class path resource [org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.http.HttpMessageConverters]: Factory method 'messageConverters' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
        at 

    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageConverters' defined in class path resource [org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.http.HttpMessageConverters]: Factory method 'messageConverters' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageConverters' defined in class path resource [org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.http.HttpMessageConverters]: Factory method 'messageConverters' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.http.HttpMessageConverters]: Factory method 'messageConverters' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

        ... 91 more
    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapperBuilder' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
        at 

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 

    Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Could not bind properties to 'JacksonProperties' : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.jackson.deserialization' to java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>
        at 
        

UDP 2020.08.19 我发现错误。我从 Run 中完全删除了 Tomcat 配置并再次创建。之后工作正常并添加到依赖项// mvnrepository.com/artifact/com.fasterxml.jackson.core/... 编译组:'com.fasterxml.jackson.core',名称:'jackson-databind',版本:'2.11 .2'


推荐阅读