今天在学习Spring里配置数据库事务时遇到了 “The reference to entity "useSSL" must end with the ';' delimiter.”报错,是在连接字符串那一行出现的,这是之前的写的代码
<property name="url" value="jdbc:mysql://localhost:3306/web?serverTimezone=UTC&useSSL=false"></property>
后来意识到问题所在,将代码改成了
<property name="url" value="jdbc:mysql://localhost:3306/web?serverTimezone=UTC&useSSL=false"></property>
问题原因是:在Spring里各种符号要用它的的转义字符,上面我将“&”改写成“&”后,报错消失