Severe: cannot create JDBC driver of class 'com. MySQL. JDBC. Driver'
Connect url'
JDBC: mysql: // localhost: 3306/example? Useunicode = true & characterencoding = UTF-8
Applicationcontext. xml
<Bean id = "mydatasource"
Class = "org. Apache. commons. DBCP. basicdatasource"
Destroy-method = "close">
<Property name = "driverclassname">
<Value> com. MySQL. JDBC. Driver </value>
</Property>
<Property name = "url">
<Value>
JDBC: mysql: // localhost: 3306/example? Useunicode = true & amp; characterencoding = UTF-8
</Value>
</Property>
<Property name = "username">
<Value> root </value>
</Property>
<Property name = "password">
<Value> 1 </value>
</Property>
</Bean>
Solution:
Set <value>
JDBC: mysql: // localhost: 3306/example? Useunicode = true & amp; characterencoding = UTF-8
</Value>
Changed:
<Value> JDBC: mysql: // localhost: 3306/example? Useunicode = true & amp; characterencoding = UTF-8 </value>
No spaces are left in the middle!