<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
当我mvn jetty:run的时候,系统给出
SAXParseException: The reference to entity "characterEncoding" must end with the ;
解决问题: 红色部分
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8
本文介绍了一个关于Spring框架中XML配置文件出现SAXParseException的具体案例,该错误通常发生在使用Maven运行Jetty时。文章详细解析了错误产生的原因,并提供了具体的解决方案,即如何正确地设置URL中的参数,避免因参数格式不正确导致的解析失败。
851

被折叠的 条评论
为什么被折叠?



