<?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:context= "Http://www.springframework.org/schema/context"
Xmlns:mvc= "Http://www.springframework.org/schema/mvc"
xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans.xsd
Http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd " >
<!--Configure the service package scan, automatically inject service-->
<context:component-scan base-package= "Com.simple"/>
<!--Use the spring-brought placeholder replacement feature-
<bean
class= "Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
<!--allow JVM parameters to be overwritten--
<property name= "Systempropertiesmodename" value= "System_properties_mode_override"/>
<!--ignore resource files not found--
<property name= "Ignoreresourcenotfound" value= "true"/>
<!--configuring resource Files--
<property name= "Locations" >
<list>
<value>classpath:jdbc.properties</value>
<value>classpath:env.properties</value>
</list>
</property>
</bean>
<!--database connection pool--
<bean id= "DataSource" class= "Com.jolbox.bonecp.BoneCPDataSource"
destroy-method= "Close" >
<!--database-driven
<property name= "Driverclass" value= "${jdbc.driver}"/>
<!--the corresponding drive Jdbcurl--
<property name= "Jdbcurl" value= "${jdbc.url}"/>
<!--database user name--
<property name= "username" value= "${jdbc.username}"/>
<!--database Password--
<property name= "Password" value= "${jdbc.password}"/>
<!--Check the time interval for idle connections in the database connection pool, in units of minutes, default: 240, if you want to cancel, set to 0--
<property name= "idleconnectiontestperiod" value= "/>"
<!--the maximum lifetime of unused links in a connection pool, in units of minutes, default: 60, if you want to live forever set to 0--
<property name= "idlemaxage" value= "/>"
<!--The maximum number of connections per partition--
<property name= "maxconnectionsperpartition" value= "/>"
<!--the minimum number of connections per partition--
<property name= "Minconnectionsperpartition" value= "5"/>
</bean>
</beans>
Configuration series: Simple configuration of Applicationcontext.xml in SSM