首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在“spring.jackson.deserialization”下绑定属性失败

在“spring.jackson.deserialization”下绑定属性失败
EN

Stack Overflow用户
提问于 2020-07-30 17:39:49
回答 1查看 2.3K关注 0票数 0

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

java.util.Map:原因:没有找到能够将java.lang.String类型转换为java.util.Map操作的转换器:

更新应用程序的配置

我的application.properties空了

项目由gradle构建。

build.gradle

代码语言:javascript
复制
    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()
    }
代码语言:javascript
复制
    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);
    }
    
    }
代码语言:javascript
复制
    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);
        }
    
    }
代码语言:javascript
复制
    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() {
            }
    
    
        }
代码语言:javascript
复制
    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;
            }
        }
代码语言:javascript
复制
    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;
            }
        }
代码语言:javascript
复制
    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;
            }
        }

我的错误在哪里?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-31 08:39:34

新误差

代码语言:javascript
复制
***************************
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 

我发现了错误。我从运行中完全删除Tomcat配置,并再次创建。之后很好地工作,并添加到依赖// mvnrepository.com/artifact/com.fasterxml.jackson.core/…中。编译组:‘com.Quickerxml.Jackson.core’,名称:'jackson-databind',版本:'2.11.2‘

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63178501

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档