applicationContext.xml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
  6. xmlns:cache="http://www.springframework.org/schema/cache" xmlns:util="http://www.springframework.org/schema/util"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
  8. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
  9. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
  10. http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
  11. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
  12. http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
  13. http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd">
  14. <context:property-placeholder location="classpath*:*.properties" />
  15. <!-- 注册spring上下文对象 -->
  16. <bean class="com.uas.report.support.ApplicationContextRegister" />
  17. <!-- 扫描注解 -->
  18. <context:annotation-config />
  19. <!-- 扫描的包 -->
  20. <context:component-scan base-package="com.uas.report" />
  21. <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
  22. destroy-method="close">
  23. <property name="driverClassName" value="${jdbc.driverClassName}" />
  24. <property name="url" value="${jdbc.url}" />
  25. <property name="username" value="${jdbc.username}" />
  26. <property name="password" value="${jdbc.password}" />
  27. <property name="initialSize" value="${jdbc.initialSize}" />
  28. <property name="maxActive" value="${jdbc.maxActive}" />
  29. <property name="maxIdle" value="${jdbc.maxIdle}" />
  30. <property name="minIdle" value="${jdbc.minIdle}" />
  31. <property name="removeAbandoned" value="true" />
  32. <property name="timeBetweenEvictionRunsMillis" value="${jdbc.timeBetweenEvictionRunsMillis}" />
  33. <property name="minEvictableIdleTimeMillis" value="${jdbc.minEvictableIdleTimeMillis}" />
  34. </bean>
  35. </beans>