美文网首页
db.properties

db.properties

作者: 诗酒趁年华_d593 | 来源:发表于2020-03-29 19:17 被阅读0次
    jdbc.driver=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=utf8
    jdbc.username=root
    jdbc.password=root
    
    
    jdbc.driver=oracle.jdbc.driver.OracleDriver
    jdbc.url=jdbc:oracle:thin:@192.168.161.10:1521:orcl
    jdbc.username=ssm
    jdbc.password=itcast
    
    
    <context:property-placeholder location="classpath:db.properties"/>
    <!-- 配置连接池 -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
    <property name="driverClass" value="${jdbc.driver}" />
    <property name="jdbcUrl" value="${jdbc.url}" />
    <property name="user" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    </bean>

    相关文章

      网友评论

          本文标题:db.properties

          本文链接:https://www.haomeiwen.com/subject/rfguuhtx.html