a-multi-shop-master/code/multiShop/src/config/spring/applicationContext.xml
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!-- 数据库参数配置 -->
<value>classpath:config/jdbc/jdbc.properties</value>
<!-- 微信授权登录配置 -->
<value>classpath:config/message/wechatAuth.properties</value>
</list>
</property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="maxActive" value="${jdbc.dbcp.maxActive}" />
<property name="maxIdle" value="${jdbc.dbcp.maxIdle}" />
<property name="minIdle" value="${jdbc.dbcp.minIdle}" />
<!-- 给出一条简单的sql语句进行验证-->
<property name="validationQuery" value="select now()" />
<!-- 取出连接时进行有效验证-->
<property name="testOnBorrow" value="true" />
<!-- 超过时间限制是否回收 -->
<property name="removeAbandoned" value="true" />
<!-- 超时时间;单位为秒。 -->
<property name="removeAbandonedTimeout" value="120" />
<!-- 运行判断连接超时任务的时间间隔,单位为毫秒,默认为-1,即不执行任务。 -->
<property name="timeBetweenEvictionRunsMillis" value="${jdbc.dbcp.timeBetweenEvictionRunsMillis}" />
<!-- 连接的超时时间,默认为半小时。 -->
<property name="minEvictableIdleTimeMillis" value="${jdbc.dbcp.minEvictableIdleTimeMillis}" />
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="baseJdbcDao" class="com.sky.business.common.dao.impl.BaseJdbcDaoImpl">
<property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
