12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:jdbc="http://www.springframework.org/schema/jdbc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jee="http://www.springframework.org/schema/jee"
- xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
- http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
- <!-- 可通过web.xml中设置以下内容,选择激活不同的数据源
- <context-param>
- <param-name>spring.profiles.active</param-name>
- <param-value>developer</param-value>
- </context-param>
- -->
- <!-- 开发环境数据源 @ActiveProfiles("developer") -->
- <beans profile="developer"><!--内存数据库 -->
- <jdbc:embedded-database id="dataSource" type="H2">
- <!-- ;
- <jdbc:script location="classpath:database/meishiqq-schema.sql"/>
- <jdbc:script location="classpath:database/meishiqq-dataload.sql"/>
- -->
- </jdbc:embedded-database>
- </beans>
- <!-- 生产环境数据源 @ActiveProfiles("production") -->
- <beans profile="production"><!-- 数据连接池 -->
- <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <!-- 请不要用 p2p21_longedai_czbank_newandold数据库-->
- <property name="url" value="jdbc:mysql://192.168.33.159:3306/p2p21_piaojuke_czbank?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull" />
- <property name="username" value="root" />
- <property name="password" value="p2p_zdsoft!" />
- <!-- druid 连接池的 -->
- <property name="filters" value="stat" />
- <!-- 下面druid 和 dbcp 连接池通用的 ↓↓↓↓↓↓↓↓↓↓↓↓ -->
- <!--maxActive: 最大连接数量 -->
- <property name="maxActive" value="20" />
- <!--initialSize: 初始化连接 -->
- <property name="initialSize" value="5" />
- </bean>
- </beans>
- </beans>
|