I have my application.properties set up like this :
spring.datasource.username = root
spring.datasource.password = root
spring.datasource.url =
Non of the answer worked for me … except the url encoding part.
The solution in my case is twofold:
1- Add encoding in the URL of Database config bean:
2- Add this configuration to your dispatcher config file:
encoding-filter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
encoding-filter
/*
REQUEST
FORWARD
Otherwise, other configurations don't take effect.