spring mvc dispatcherservlet 第7章 使用springMVC构建Web应用程序 7.1 s(5)

电脑杂谈  发布时间:2017-12-24 06:08:59  来源:网络整理

<context:include-filtertype="annotation"expression="org.springframework.stereotype.Repository"/>

</context:component-scan>

<beanid="dataSource"class="com.mchange.v2.c3p0.ComboPooledDataSource"destroy-method="close">

<propertyname="driverClass"value="com.mysql.jdbc.Driver"/>

<propertyname="jdbcUrl"value="jdbc:mysql:///db_aries"/>

<propertyname="user"value="aries"/>

<propertyname="password"value="1991"/>

<propertyname="minPoolSize"value="5"/>

<propertyname="maxPoolSize"value="15"/>

<propertyname="initialPoolSize"value="5"/>

<propertyname="checkoutTimeout"value="3000"/>

<propertyname="idleConnectionTestPeriod"value="180"/>

<propertyname="maxIdleTime"value="180"/>

<propertyname="propertyCycle"value="300"/>

<propertyname="numHelperThreads"value="10"/>

<propertyname="maxStatements"value="100"/>

<propertyname="maxStatementsPerConnection"value="10"/>

<propertyname="acquireIncrement"value="3"/>

<propertyname="acquireRetryAttempts"value="30"/>

springmvc注解详解_spring mvc dispatcherservlet_spring mvc下载

<propertyname="breakAfterAcquireFailure"value="false"/>

</bean>

<!--spring与mybatis整合-->

<beanid="sqlSessionFactory"class="org.mybatis.spring.SqlSessionFactoryBean">

<propertyname="dataSource"ref="dataSource"/>

<propertyname="configLocation"value="xml/mybatisConfig.xml"/>

</bean>

</beans>

4.mybatisConfig.xml

<?xmlversion="1.0"encoding="UTF-8"?>

<!DOCTYPEconfigurationPUBLIC"-//mybatis.org//DTDConfig3.0//EN"


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-55464-5.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 刘张健
      刘张健

      这个只有对的方向才是最好的不是吗

    热点图片
    拼命载入中...