I faced the same issue in my Spring Boot Data JPA application when I was going to insert an image file in the database as bytes – it gave me the same error.
After many R&D I found a solution like below.
I added the following line in my application.properties file and it resolved the issue:
spring.datasource.url=jdbc:mysql://localhost:3306/conweb?sessionVariables=sql_mode="NO_ENGINE_SUBSTITUTION"&jdbcCompliantTruncation=false
Hope it will be helpful to someone.