list属性注入:
aaaa
ssss
map属性注入:
properties属性注入:
aaa
ccc
引入其他配置文件;
假如你创建了applicationContext-user.xml配置文件,可以在applicationContext.xml中来引入user.xml配置文件
applicationContext.xml引入外部文件
<context:property-placeholder location=“classpath:jdbc.properties”/>
同时applicationContext.xml文件约束头要引入context命名空间
使用注解时,要在applicationContext.xml中配置组件扫描
<context:component-scan base-package=“com.mao”/>