{"record":{"id":"22f2d1d8a4e47870","repo":"quarkusio/quarkus","slug":"support-for-list-of-objects-in-classes-annotated-w-22f2d1","errorCode":null,"errorMessage":"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension. Offending method is ' + method.name() + ' of interface ' + method.declaringClass().name().toString()","messagePattern":"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension\\. Offending method is ' \\+ method\\.name\\(\\) \\+ ' of interface ' \\+ method\\.declaringClass\\(\\)\\.name\\(\\)\\.toString\\(\\)","errorType":"exception","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/InterfaceConfigurationPropertiesUtil.java","lineNumber":250,"sourceCode":"                                    // convert the String value and populate an Optional with it\n                                    ConfigurationPropertiesUtil.createReadOptionalValueAndConvertIfNeeded(\n                                            fullConfigName,\n                                            genericType, method.declaringClass().name(), bc, config,\n                                            (trueBranch, value) -> {\n                                                // return Optional.of() using the converted value\n                                                trueBranch.return_(trueBranch.invokeStatic(\n                                                        MethodDesc.of(Optional.class, \"of\", Optional.class, Object.class),\n                                                        value));\n                                            },\n                                            falseBranch -> {\n                                                // return Optional.empty() if no config value was read\n                                                falseBranch.return_(falseBranch.invokeStatic(\n                                                        MethodDesc.of(Optional.class, \"empty\", Optional.class)));\n                                            });\n                                }\n                            } else if (ConfigurationPropertiesUtil.isListOfObject(method.returnType())) {\n                                if (!capabilities.isPresent(Capability.CONFIG_YAML)) {\n                                    throw new DeploymentException(\n                                            \"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension. Offending method is '\"\n                                                    + method.name() + \"' of interface '\"\n                                                    + method.declaringClass().name().toString());\n                                }\n                                Expr value = yamlListObjectHandler.handle(\n                                        new YamlListObjectHandler.MethodReturnTypeMember(method), bc, config,\n                                        nameAndDefaultValue.getName(), fullConfigName);\n                                bc.return_(value);\n                            } else {\n                                if (defaultValueStr != null) {\n                                    /*\n                                     * The effect this will have is to add a ConfigSource with a lower priority\n                                     * This ensures that when we try to read the property value using\n                                     * config.getValue(fullConfigName), the default value will be returned if none is\n                                     * set\n                                     */\n                                    defaultConfigValues\n                                            .produce(new RunTimeConfigurationDefaultBuildItem(fullConfigName,","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/InterfaceConfigurationPropertiesUtil.java#L232-L268","documentation":"When a @ConfigProperties interface method returns List<SomeObject>, the generated config mapping requires special YAML list-object support which only the quarkus-config-yaml extension provides. If that capability is absent at build time, deployment aborts with a DeploymentException.","triggerScenarios":"Interface annotated with @ConfigProperties has a method whose return type is List<SomeClass> (list of objects, not scalars) and the application does not include the quarkus-config-yaml dependency.","commonSituations":"Spring Boot migration with nested list-of-object configuration (e.g. List<ServerConfig>) relying on .properties/.yml via the default SmallRye converter, which cannot express nested object lists.","solutions":["Add io.quarkus:quarkus-config-yaml to the application dependencies","Restructure config to use a nested class exposing indexed properties instead of List<SomeClass>","Convert the list configuration to use YAML with the yaml extension installed"],"exampleFix":"// pom.xml before\n<dependency>io.quarkus:quarkus-spring-boot-properties</dependency>\n// after\n<dependency>io.quarkus:quarkus-spring-boot-properties</dependency>\n<dependency>io.quarkus:quarkus-config-yaml</dependency>","handlingStrategy":"validation","validationCode":"boolean needsYamlExtension(Class<?> cfg) {\n    for (Method m : cfg.getMethods()) {\n        Type gt = m.getGenericReturnType();\n        if (gt instanceof ParameterizedType p && p.getRawType() == List.class\n            && ((Class<?>) p.getActualTypeArguments()[0]).isInterface() == false\n            && !p.getActualTypeArguments()[0].getTypeName().startsWith(\"java.\")) return true;\n    }\n    return false;\n}","typeGuard":null,"tryCatchPattern":"catch (DeploymentException e) { if (e.getMessage().contains(\"quarkus-config-yaml\")) { /* add quarkus-config-yaml dependency */ } throw e; }","preventionTips":["Add quarkus-config-yaml whenever config uses nested object lists","Keep list-of-object config in YAML files, not .properties","Check dependencies before migrating Spring Boot list config"],"tags":["quarkus","config","yaml","list-of-objects"],"backgroundTag":"missing-quarkus-config-yaml","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}