applicationContext-resources.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:jee="http://www.springframework.org/schema/jee"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  5. http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">
  6. <!-- For mail settings and future properties files -->
  7. <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  8. <property name="ignoreUnresolvablePlaceholders" value="true"/>
  9. <property name="locations">
  10. <list>
  11. <value>classpath:jdbc.properties</value>
  12. <!--
  13. <value>classpath:mail.properties</value>
  14. -->
  15. <value>classpath:hibernate.properties</value>
  16. </list>
  17. </property>
  18. </bean>
  19. <!-- JNDI DataSource for J2EE environments -->
  20. <!--<jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/mobserver"/>-->
  21. <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
  22. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  23. <property name="url" value="jdbc:mysql://rm-wz949306t03an8m8s4o.mysql.rds.aliyuncs.com/super_service_dev?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true"/>
  24. <property name="username" value="superdev"/>
  25. <property name="password" value="super_Service1221@!"/>
  26. <property name="maxActive" value="50"/>
  27. <property name="maxWait" value="20"/>
  28. <property name="poolPreparedStatements" value="true"/>
  29. <property name="defaultAutoCommit" value="true"/>
  30. <property name="validationQuery" value="SELECT 1+1"/>
  31. <property name="testOnBorrow" value="true"/>
  32. </bean>
  33. </beans>