This is a followup question to the following:
JPA utf-8 characters not persisted
The answer (https://stackoverflow.com/a/32574280) worked for me. However, I
if you are using spring boot, in application properties
spring.datasource.connectionProperties=useUnicode=true;characterEncoding=utf-8;
I stumbled into the same problem. Namely, I need to enable connection encryption by setting Oracle specific properties while using Tomcat Data Source and Spring Boot.
Turns out the only way to do that with Spring Boot is to create a custom DataSource bean in the application configuration class.
There is no way to pass custom connection properties to the pool, Spring Boot doesn't allow that. I checked Spring Boot 1.4.1 and the current master version of Spring Boot.
If interested, take a look at DataSourceConfiguration.Tomcat class. The only properties it passes to the pool are the ones defined in DataSourceProperties class. The later doesn't have any fields allowing to pass custom properties, it supports only the predefined set of properties that are common for all datasources.