apache dbcp mysql数据源配置
<bean id="MyDataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"> </property> <!-- property name="url" value="jdbc:mysql://localhost/fireflow2?useUnicode=true&characterEncoding=UTF8" --> <property name="url" value="jdbc:mysql://localhost/fireflow2?useUnicode=true&characterEncoding=UTF8"> </property> <property name="username" value="root"></property> <property name="password" value="mysql"></property> </bean>
弄半天老是出问题,终于找到错误原因"&"在xml中定义要进行转义"&"。唉,白花了两小时。郁闷!
相关推荐
Kafka 2020-09-18
Wepe0 2020-10-30
杜倩 2020-10-29
windle 2020-10-29
minerd 2020-10-28
mengzuchao 2020-10-22
Junzizhiai 2020-10-10
bxqybxqy 2020-09-30
风之沙城 2020-09-24
kingszelda 2020-09-22
大唐帝国前营 2020-08-18
yixu0 2020-08-17
TangCuYu 2020-08-15
xiaoboliu00 2020-08-15
songshijiazuaa 2020-08-15
xclxcl 2020-08-03
zmzmmf 2020-08-03
newfarhui 2020-08-03
likesyour 2020-08-01