This can also work in application.properties:
spring.datasource.hikari.data-source-properties.allowLoadLocalInfile=true
For more Data Source properties (not particular to the engine): https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html