The String name is injected into the int age using Spring c namespace injection spring6 1 2

Comment From: jhoeller

If you are using Spring Framework 6.1.x there, have you compiled your classes with -parameters? This is mandatory as of 6.1 since we do not detect debug symbols anymore.

Comment From: PaceyWang

No, I use Maven3.8 to manage and compile my project, use Junit5.9 to test it. When I use Spring6.0.6,the problem seems solved, so I think the problem is from spring6.1.2.

Comment From: PaceyWang

No, I use Maven3.8 to manage and compile my project, use Junit5.9 to test it. When I use Spring6.0.6,the problem seems solved, so I think the problem is from spring6.1.2.

------------------ 原始邮件 ------------------ 发件人: "spring-projects/spring-framework" @.>; 发送时间: 2024年2月2日(星期五) 晚上10:54 @.>; @.**@.**>; 主题: Re: [spring-projects/spring-framework] c namespace injection Exception (Issue #32188)

If you are using Spring Framework 6.1.x there, have you compiled your classes with -parameters? This is mandatory as of 6.1 since we do not detect debug symbols anymore.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Comment From: jhoeller

Make sure to configure the Maven compiler plugin accordingly then: see https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention.

As of 6.1, -parameters is a must-have for such scenarios.

Comment From: PaceyWang

Spring c namespace injection Exception I set in Maven like this and add param -parameter in idea, but the problem is still existing. Spring c namespace injection Exception

Comment From: PaceyWang

and when I switch the version to 6.1.3, the problem is not existing. It seems only in 6.1.2

Comment From: sbrannen

and add param -parameter in idea

Please note that it is -parameters (with an "s").

In addition, the screenshot you've provided does not show that you added anything to the "Additional command line parameters" field, and (since I don't use IDEA) I don't know if that "Override compiler parameters per-module" feature achieves the exact same goal.

and when I switch the version to 6.1.3, the problem is not existing. It seems only in 6.1.2

6.1.2 has been superseded by 6.1.3, so use 6.1.3.