I'm not sure either, but I would also assume that ENABLE_SELECTIVE is already the default, because with @Cacheable
you somehow activate it selectively.
However, using spring boot according to the answer on Spring Boot + JPA2 + Hibernate - enable second level cache it seems like you can influence the cache mode using application.properties (spring boot's configuration file) with an entry like this:
spring.jpa.properties.javax.persistence.sharedCache.mode=ENABLE_SELECTIVE
Maybe you can transfer this into the XML world and use the property like this in your JPA spring configuration XML file:
<bean id="myEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="com.example.persistence.model" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
<prop key="javax.persistence.sharedCache.mode">ENABLE_SELECTIVE</prop>
</props>
</property>
</bean>
I haven't tested it, but IMO this the right way to go.