Failed to bind properties under ‘spring.jackson.deserialization’.

huangapple go评论103阅读模式
英文:

Failed to bind properties under 'spring.jackson.deserialization'

问题

您的错误在于应用程序试图将一个java.lang.String类型的属性绑定到java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean>类型的属性,但没有找到适当的转换器来执行此操作。这通常是因为应用程序的配置不正确或不完整导致的。

要解决这个问题,您可以按照以下步骤进行操作:

  1. 确保您的应用程序配置文件(application.properties)包含所需的Spring Jackson配置。您可以尝试添加以下配置到您的application.properties文件中:
  1. spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
  2. spring.jackson.deserialization.FAIL_ON_UNKNOWN_PROPERTIES=false

这将禁用在没有任何可序列化或反序列化属性的情况下引发异常的行为。

  1. 确保您的Gradle构建文件中的Spring Boot版本与您正在使用的Spring Boot版本匹配。检查build.gradle中的Spring Boot插件版本,确保它与您的Spring Boot应用程序的实际版本兼容。

  2. 重新构建和部署您的应用程序。如果更改了配置文件,请确保新的配置文件已生效。

如果您的问题仍然存在,请提供更多关于您的应用程序配置和Tomcat部署的详细信息,以便更好地帮助您解决问题。

英文:

When I start my project into deploy on Tomcat i get the error message

> 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

my application.properties is empty

project build by gradle.

build.gradle

  1. plugins {
  2. id &#39;org.springframework.boot&#39; version &#39;2.3.2.RELEASE&#39;
  3. id &#39;io.spring.dependency-management&#39; version &#39;1.0.9.RELEASE&#39;
  4. id &#39;java&#39;
  5. id &#39;war&#39;
  6. }
  7. group = &#39;com.ladon&#39;
  8. version = &#39;0.0.1&#39;
  9. sourceCompatibility = &#39;11&#39;
  10. repositories {
  11. mavenCentral()
  12. }
  13. dependencies {
  14. implementation &#39;org.springframework.boot:spring-boot-starter-web&#39;
  15. implementation &#39;org.springframework.boot:spring-boot-starter-data-jpa&#39;
  16. runtimeOnly &#39;com.h2database:h2&#39;
  17. runtimeOnly &#39;com.microsoft.sqlserver:mssql-jdbc&#39;
  18. runtimeOnly &#39;mysql:mysql-connector-java&#39;
  19. runtimeOnly &#39;org.apache.derby:derby&#39;
  20. runtimeOnly &#39;org.postgresql:postgresql&#39;
  21. compileOnly &#39;org.projectlombok:lombok:1.18.12&#39;
  22. annotationProcessor &#39;org.projectlombok:lombok:1.18.12&#39;
  23. testCompileOnly &#39;org.projectlombok:lombok:1.18.12&#39;
  24. testAnnotationProcessor &#39;org.projectlombok:lombok:1.18.12&#39;
  25. providedRuntime &#39;org.springframework.boot:spring-boot-starter-tomcat&#39;
  26. testImplementation(&#39;org.springframework.boot:spring-boot-starter-test&#39;) {
  27. exclude group: &#39;org.junit.vintage&#39;, module: &#39;junit-vintage-engine&#39;
  28. }
  29. }
  30. test {
  31. useJUnitPlatform()
  32. }
  1. package com.ladon.jsonserver;
  2. import org.springframework.boot.builder.SpringApplicationBuilder;
  3. import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  4. public class ServletInitializer extends SpringBootServletInitializer {
  5. @Override
  6. protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  7. return application.sources(JsonserverApplication.class);
  8. }
  9. }
  1. package com.ladon.jsonserver;
  2. import org.springframework.boot.SpringApplication;
  3. import org.springframework.boot.autoconfigure.SpringBootApplication;
  4. @SpringBootApplication
  5. public class JsonserverApplication {
  6. public static void main(String[] args) {
  7. SpringApplication.run(JsonserverApplication.class, args);
  8. }
  9. }
  1. package com.ladon.jsonserver.structure;
  2. import com.fasterxml.jackson.annotation.JsonIgnore;
  3. import com.fasterxml.jackson.annotation.JsonInclude;
  4. import com.fasterxml.jackson.annotation.JsonProperty;
  5. import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  6. import lombok.Data;
  7. import java.util.HashMap;
  8. import java.util.List;
  9. import java.util.Map;
  10. @JsonInclude(JsonInclude.Include.NON_NULL)
  11. @JsonPropertyOrder({
  12. &quot;ACTIONS&quot;,
  13. &quot;EcrSN&quot;,
  14. &quot;Group&quot;,
  15. &quot;ErrorCode&quot;,
  16. &quot;ErrorCodeMessage&quot;
  17. })
  18. public @Data class DeviceStatusUpdateResponse {
  19. @JsonProperty(&quot;ACTIONS&quot;)
  20. private List&lt;DeviceStatusUpdateACTIONSResponse&gt; aCTIONS = null;
  21. @JsonProperty(&quot;EcrSN&quot;)
  22. private Integer ecrSN;
  23. @JsonProperty(&quot;Group&quot;)
  24. private String group;
  25. @JsonProperty(&quot;ErrorCode&quot;)
  26. private Integer errorCode;
  27. @JsonProperty(&quot;ErrorCodeMessage&quot;)
  28. private String errorCodeMessage;
  29. @JsonIgnore
  30. private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  31. public DeviceStatusUpdateResponse() {
  32. }
  33. }
  1. package com.ladon.jsonserver.structure;
  2. import java.io.Serializable;
  3. import java.util.HashMap;
  4. import java.util.List;
  5. import java.util.Map;
  6. import com.fasterxml.jackson.annotation.JsonIgnore;
  7. import com.fasterxml.jackson.annotation.JsonInclude;
  8. import com.fasterxml.jackson.annotation.JsonProperty;
  9. import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  10. import lombok.Data;
  11. @JsonInclude(JsonInclude.Include.NON_NULL)
  12. @JsonPropertyOrder({
  13. &quot;TypeId&quot;,
  14. &quot;Id&quot;,
  15. &quot;CreationTimestamp&quot;,
  16. &quot;ExecutionTimestamp&quot;,
  17. &quot;Note&quot;,
  18. &quot;DownloadURL&quot;,
  19. &quot;DeployType&quot;,
  20. &quot;NewEcrFwVersion&quot;,
  21. &quot;NewEcrFwVersionDescription&quot;,
  22. &quot;MD&quot;,
  23. &quot;CMD&quot;
  24. })
  25. public @Data class DeviceStatusUpdateACTIONSResponse implements Serializable {
  26. @JsonProperty(&quot;TypeId&quot;)
  27. private Integer typeId;
  28. @JsonProperty(&quot;Id&quot;)
  29. private Integer id;
  30. @JsonProperty(&quot;CreationTimestamp&quot;)
  31. private String creationTimestamp;
  32. @JsonProperty(&quot;ExecutionTimestamp&quot;)
  33. private String executionTimestamp;
  34. @JsonProperty(&quot;Note&quot;)
  35. private String note;
  36. @JsonProperty(&quot;DownloadURL&quot;)
  37. private String downloadURL;
  38. @JsonProperty(&quot;DeployType&quot;)
  39. private String deployType;
  40. @JsonProperty(&quot;NewEcrFwVersion&quot;)
  41. private Integer newEcrFwVersion;
  42. @JsonProperty(&quot;NewEcrFwVersionDescription&quot;)
  43. private String newEcrFwVersionDescription;
  44. @JsonProperty(&quot;MD&quot;)
  45. private String mD;
  46. @JsonProperty(&quot;CMD&quot;)
  47. private List&lt;DeviceStatusUpdateACTIONSCMDResponse&gt; cMD = null;
  48. @JsonIgnore
  49. private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  50. public DeviceStatusUpdateACTIONSResponse() {
  51. }
  52. /**
  53. *
  54. * @param note
  55. * @param newEcrFwVersionDescription
  56. * @param newEcrFwVersion
  57. * @param mD
  58. * @param creationTimestamp
  59. * @param downloadURL
  60. * @param typeId
  61. * @param id
  62. * @param cMD
  63. * @param deployType
  64. * @param executionTimestamp
  65. */
  66. public DeviceStatusUpdateACTIONSResponse(Integer typeId, Integer id, String creationTimestamp, String executionTimestamp, String note, String downloadURL, String deployType, Integer newEcrFwVersion, String newEcrFwVersionDescription, String mD, List&lt;DeviceStatusUpdateACTIONSCMDResponse&gt; cMD) {
  67. super();
  68. this.typeId = typeId;
  69. this.id = id;
  70. this.creationTimestamp = creationTimestamp;
  71. this.executionTimestamp = executionTimestamp;
  72. this.note = note;
  73. this.downloadURL = downloadURL;
  74. this.deployType = deployType;
  75. this.newEcrFwVersion = newEcrFwVersion;
  76. this.newEcrFwVersionDescription = newEcrFwVersionDescription;
  77. this.mD = mD;
  78. this.cMD = cMD;
  79. }
  80. }
  1. package com.ladon.jsonserver.structure;
  2. import java.io.Serializable;
  3. import java.util.HashMap;
  4. import java.util.Map;
  5. import com.fasterxml.jackson.annotation.JsonIgnore;
  6. import com.fasterxml.jackson.annotation.JsonInclude;
  7. import com.fasterxml.jackson.annotation.JsonProperty;
  8. import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  9. import lombok.Data;
  10. @JsonInclude(JsonInclude.Include.NON_NULL)
  11. @JsonPropertyOrder({
  12. &quot;CmdId&quot;,
  13. &quot;Commandd&quot;,
  14. &quot;Psw&quot;,
  15. &quot;Body&quot;,
  16. &quot;ExtendedDeviceStatus&quot;,
  17. &quot;OnlyIfPreviousOk&quot;,
  18. &quot;StateExe&quot;
  19. })
  20. public @Data class DeviceStatusUpdateACTIONSCMDResponse implements Serializable {
  21. @JsonProperty(&quot;CmdId&quot;)
  22. private Integer cmdId;
  23. @JsonProperty(&quot;Commandd&quot;)
  24. private String commandd;
  25. @JsonProperty(&quot;Psw&quot;)
  26. private Integer psw;
  27. @JsonProperty(&quot;Body&quot;)
  28. private String body;
  29. @JsonProperty(&quot;ExtendedDeviceStatus&quot;)
  30. private Integer extendedDeviceStatus;
  31. @JsonProperty(&quot;OnlyIfPreviousOk&quot;)
  32. private Boolean onlyIfPreviousOk;
  33. @JsonProperty(&quot;StateExe&quot;)
  34. private Integer stateExe;
  35. @JsonIgnore
  36. private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  37. public DeviceStatusUpdateACTIONSCMDResponse() {
  38. }
  39. public DeviceStatusUpdateACTIONSCMDResponse(Integer cmdId, String commandd, Integer psw, String body, Integer extendedDeviceStatus, Boolean onlyIfPreviousOk, Integer stateExe) {
  40. super();
  41. this.cmdId = cmdId;
  42. this.commandd = commandd;
  43. this.psw = psw;
  44. this.body = body;
  45. this.extendedDeviceStatus = extendedDeviceStatus;
  46. this.onlyIfPreviousOk = onlyIfPreviousOk;
  47. this.stateExe = stateExe;
  48. }
  49. }
  1. package com.ladon.jsonserver.controller;
  2. import com.ladon.jsonserver.structure.DeviceStatusUpdateResponse;
  3. import org.springframework.http.HttpStatus;
  4. import org.springframework.http.MediaType;
  5. import org.springframework.web.bind.annotation.*;
  6. @RestController
  7. @RequestMapping(&quot;/RemoteControl&quot;)
  8. public class DeviceStatusUpdateResponseController {
  9. @ResponseBody
  10. @ResponseStatus(value = HttpStatus.OK)
  11. @RequestMapping(value = &quot;/UpdateDeviceStatus/{sernum}&quot;,produces = MediaType.APPLICATION_JSON_VALUE)
  12. public DeviceStatusUpdateResponse DeviceStatusUpdateResponse(@PathVariable(&quot;sernum&quot;) long sernum)
  13. {
  14. DeviceStatusUpdateResponse device = new DeviceStatusUpdateResponse();
  15. return device;
  16. }
  17. }

Where is my mistake?

答案1

得分: 0

新错误

  1. ***************************
  2. 启动应用程序失败
  3. ***************************
  4. 描述:
  5. 未能将属性绑定到 'spring.jackson.deserialization' 下的 java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;:
  6. 原因:找不到能够从类型 [java.lang.String] 转换到类型 [java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;] 的转换器
  7. 操作:
  8. 更新您的应用程序配置
  9. 2020731 11:34:21.283 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke 方法调用异常 [manageApp]
  10. java.lang.IllegalStateException: 启动子级时发生错误
  11. at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
  12. at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
  13. at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
  14. at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1727)
  15. at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  16. at
  17. 由于:org.springframework.beans.factory.BeanCreationException: 在类路径资源 [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class] 中定义的名为 'requestMappingHandlerAdapter' bean 创建失败:通过工厂方法实例化 bean 失败;嵌套异常是 org.springframework.beans.BeanInstantiationException: 通过工厂方法 'requestMappingHandlerAdapter' 创建 bean 失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException: 在类路径资源 [org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class] 中定义的名为 'messageConverters' bean 创建失败:通过工厂方法实例化 bean 失败;嵌套异常是 org.springframework.beans.BeanInstantiationException: 通过工厂方法 'messageConverters' 创建 bean 失败;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class] 中定义的名为 'mappingJackson2HttpMessageConverter' bean 创建失败:通过方法 'mappingJackson2HttpMessageConverter' 的参数 0 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class] 中定义的名为 'jacksonObjectMapper' bean 创建失败:通过方法 'jacksonObjectMapper' 的参数 0 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class] 中定义的名为 'jacksonObjectMapperBuilder' bean 创建失败:通过方法 'jacksonObjectMapperBuilder' 的参数 1 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class] 中定义的名为 'standardJacksonObjectMapperBuilderCustomizer' bean 创建失败:通过方法 'standardJacksonObjectMapperBuilderCustomizer' 的参数 1 表达的不满足依赖性;嵌套异常是 org.springframework.boot.context.properties.ConfigurationPropertiesBindException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonProperties.class] 中定义的名为 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties' bean 创建失败:无法将属性绑定到 'JacksonProperties':前缀=spring.jacksonignoreInvalidFields=falseignoreUnknownFields=true;嵌套异常是 org.springframework.boot.context.properties.bind.BindException: 无法将属性绑定到 'spring.jackson.deserialization' 下的 java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  18. at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
  19. at
  20. 由于:org.springframework.beans.BeanInstantiationException: 通过工厂方法 'requestMappingHandlerAdapter' 创建 bean 失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException: 在类路径资源 [org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class] 中定义的名为 'messageConverters' bean 创建失败:通过工厂方法实例化 bean 失败;嵌套异常是 org.springframework.beans.BeanInstantiationException: 通过工厂方法 'messageConverters' 创建 bean 失败;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class] 中定义的名为 'mappingJackson2HttpMessageConverter' bean 创建失败:通过方法 'mappingJackson2HttpMessageConverter' 的参数 0 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class] 中定义的名为 'jacksonObjectMapper' bean 创建失败:通过方法 'jacksonObjectMapper' 的参数 0 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class] 中定义的名为 'jacksonObjectMapperBuilder' bean 创建失败:通过方法 'jacksonObjectMapperBuilder' 的参数 1 表达的不满足依赖性;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class] 中定义的名为 'standardJacksonObjectMapperBuilderCustomizer' bean 创建失败:通过方法 'standardJacksonObjectMapperBuilderCustomizer' 的参数 1 表达的不满足依赖性;嵌套异常是 org.springframework.boot.context.properties.ConfigurationPropertiesBindException: 在类路径资源 [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonProperties.class] 中定义的名为 'spring.jackson-org.springframework.boot.autoconfigure.jackson
  21. <details>
  22. <summary>英文:</summary>
  23. new error

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>:

  1. Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;]

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

  1. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;requestMappingHandlerAdapter&#39; 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 &#39;requestMappingHandlerAdapter&#39; threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;messageConverters&#39; 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 &#39;messageConverters&#39; threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;mappingJackson2HttpMessageConverter&#39; defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method &#39;mappingJackson2HttpMessageConverter&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  2. at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
  3. at
  4. Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method &#39;requestMappingHandlerAdapter&#39; threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;messageConverters&#39; 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 &#39;messageConverters&#39; threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;mappingJackson2HttpMessageConverter&#39; defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method &#39;mappingJackson2HttpMessageConverter&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  5. at
  6. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;messageConverters&#39; 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 &#39;messageConverters&#39; threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;mappingJackson2HttpMessageConverter&#39; defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method &#39;mappingJackson2HttpMessageConverter&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  7. at
  8. Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.http.HttpMessageConverters]: Factory method &#39;messageConverters&#39; threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;mappingJackson2HttpMessageConverter&#39; defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method &#39;mappingJackson2HttpMessageConverter&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  9. at
  10. ... 91 more
  11. Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;mappingJackson2HttpMessageConverter&#39; defined in class path resource [org/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method &#39;mappingJackson2HttpMessageConverter&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  12. at
  13. Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapper&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapper&#39; parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  14. at
  15. Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;jacksonObjectMapperBuilder&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Unsatisfied dependency expressed through method &#39;jacksonObjectMapperBuilder&#39; parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  16. at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
  17. at
  18. Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name &#39;standardJacksonObjectMapperBuilderCustomizer&#39; defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method &#39;standardJacksonObjectMapperBuilderCustomizer&#39; parameter 1; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  19. at
  20. Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name &#39;spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties&#39;: Could not bind properties to &#39;JacksonProperties&#39; : prefix=spring.jackson, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under &#39;spring.jackson.deserialization&#39; to java.util.Map&lt;com.fasterxml.jackson.databind.DeserializationFeature, java.lang.Boolean&gt;
  21. at
  1. UDP 2020.08.19
  2. I found mistake. I fully remove Tomcat configuration from Run and create again. After that working fine and add into dependencies // mvnrepository.com/artifact/com.fasterxml.jackson.core/… compile group: &#39;com.fasterxml.jackson.core&#39;, name: &#39;jackson-databind&#39;, version: &#39;2.11.2&#39;
  3. </details>

huangapple
  • 本文由 发表于 2020年7月31日 01:39:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/63178501.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定