在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)方法

Spring配置文件中bean属性注入:方法名与参数类型匹配