Spring配置文件中bean属性注入:方法名与参数类型匹配 日期:2028-02-14 分类:常规 在Spring配置文件中有如下代码段,下面的说法正确的是( )。 <property name="name" value="tom" 1> <property name="age" value="21" 1> (选择一项) A∶在类Employee中需要有代码public void setName()方法 B∶在类Employee中需要有代码private void setage(方法 C在类Employee中需要有代码public void setName(String name)方法 D:在类Employee中需要有代码private void setAge(int age)方法内容:C在类Employee中需要有代码public void setName(String name)方法 AI 优化版 原文地址:https://www.cveoy.top/t/topic/pFPH 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录