Spring注入问题请教……
public class test(){
private static Map<String, String> configMap;
public static Map<String, String> getConfigMap() {
return configMap;
}
public static void setConfigMap(Map<String, String> configMap) {
this.configMap = configMap;
}
}
spring的configMap配置如下
<bean id="test"
class="com.test">
<property name="configMap">
<map>
<entry key="name" value="${name}" />
<entry key="age" value = "${age}"/>
</map>
</property>
</bean>
如上的加static注入和不加有差别吗?不是都可以注入进去的吗?还是用static会因为spring的bean加载顺序不同而有时注入不了?求大师大神详解