This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch duration in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 5413a3f3d33bbabff5ff53d02e202fe6974b0d2b Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Mar 8 15:34:12 2024 +0100 CAMEL-20542: spring boot auto-configuration should not type convert java.time objects. --- .../camel/springboot/maven/SpringBootAutoConfigurationMojo.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java index 48334bcc709..e0b686d4547 100644 --- a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java +++ b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java @@ -747,6 +747,10 @@ public class SpringBootAutoConfigurationMojo extends AbstractSpringBootGenerator if (option.getJavaType().startsWith("java.util.Map") || option.getJavaType().startsWith("java.util.List") || option.getJavaType().startsWith("java.util.Set")) { return false; } + // we can configure java.time types from spring-boot so do not regard them as complex + if (option.getJavaType().startsWith("java.time")) { + return false; + } // all the object types are complex return "object".equals(option.getType()) || "duration".equals(option.getType()); } @@ -756,6 +760,11 @@ public class SpringBootAutoConfigurationMojo extends AbstractSpringBootGenerator if (option.getJavaType().startsWith("java.util.Map") || option.getJavaType().startsWith("java.util.List") || option.getJavaType().startsWith("java.util.Set")) { return false; } + // we can configure java.time types from spring-boot so do not regard them as complex + if (option.getJavaType().startsWith("java.time")) { + return false; + } + // enums are not complex if (option.getEnums() != null && !option.getEnums().isEmpty()) { return false;