spring.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xsi:schemaLocation="
  6. http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
  8. http://www.springframework.org/schema/context
  9. http://www.springframework.org/schema/context/spring-context-4.0.xsd">
  10. <context:component-scan base-package="com.fsm" />
  11. <!-- load jdbc 配置文件 -->
  12. <bean id="configBean"
  13. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  14. <property name="location" value="classpath:jdbc.properties" />
  15. </bean>
  16. <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
  17. <property name="user" value="${${db}User}" />
  18. <property name="password" value="${${db}Password}" />
  19. <property name="jdbcUrl" value="${${db}Url}" />
  20. <property name="driverClass" value="${${db}Driver}" />
  21. </bean>
  22. <!-- <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  23. <property name="jndiName">
  24. <value>${${db}JNDI}</value>
  25. </property>
  26. </bean> -->
  27. <bean id="SpringContextUtil" class="com.fsm.platform.util.SpringContextUtil"
  28. scope="singleton" />
  29. <import resource="spring-*.xml" />
  30. </beans>