0
点赞
收藏
分享

微信扫一扫

在applicationContext.xml使用properties资源


<context:property-placeholder location="classpath:config/database.properties"/>  
......
......
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">  
        <property name="driverClassName" value="${driver}"/>  
        <property name="url" value="${url}"/>  
        <property name="username" value="${username}"/>  
        <property name="password" value="${password}"/>  
    </bean>

举报

相关推荐

0 条评论