1234567891011121314151617181920212223 |
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
- <bean id="user2" class="com.sf.entity.User2" init-method="init" destroy-method="destroy">
- <property name="userId" value="1001"></property>
- <property name="userName" value="admin"></property>
- </bean>
- <!-- 实例化后置处理器ABeanPostProcessor-->
- <bean id="aBeanPostProcessor" class="com.sf.processor.ABeanPostProcessor"></bean>
- <!-- 外部资源导入-->
- <context:property-placeholder location="classpath:db.properties"></context:property-placeholder>
- <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
- <property name="username" value="${jdbc_user}"></property>
- <property name="password" value="${jdbc_password}"></property>
- <property name="url" value="${jdbc_url}"></property>
- </bean>
- </beans>
|