${username} 默认应该是给了此计算机的管理员名,我这里就是Administrator, 所以sdbc配置文件里用户名不要配置成username=xxx就行了,改成user=xxx,然后spring-dao配置文件里直接用${user}
2016-12-20
<!-- 引入配置文件 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:jdbc.properties" />
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:jdbc.properties" />
</bean>
2016-12-17
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/seckill?characterEncoding=utf8&useSSL=true
username=root
password=root
url=jdbc:mysql://127.0.0.1:3306/seckill?characterEncoding=utf8&useSSL=true
username=root
password=root
2016-12-17
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>不能用4.3.4,会提示找不到
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>不能用4.3.4,会提示找不到
2016-12-17