title: Spring Boot Multi Tenancy Without A Default Tenant
body: <p>We are facing a hard time to solve this issue!
  We are trying to use MTA for our spring boot services without using a default tenant. 
  This means we would like to return null from our CurrentTenantIdentifierResolver implementation when no tenant is present in the current context.
  This works fine in other services that we have build with JavaEE + Hibernate + Deltaspike Data but fails with our Spring services during startup. </p>
  
  <p>The exception message is the following: "Caused by: org.hibernate.HibernateException: SessionFactory configured for multi-tenancy, but no tenant identifier specified"</p>
  
  <p>The problem seems to be the repository factory trying to create instances/beans of/for our crud repositories during startup when no tenant is (and will not be) present:
  at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.(JpaRepositoryFactory.java:59) ~[spring-data-jpa-1.11.3.RELEASE.jar:na]</p>
  
  <p>So our question is if anyone out there has a solution to this as we would like to avoid using a default tenant. For us using a default seems to be error prone and would hide an illegal application state.</p>
  
  <p>We are using spring boot parent version 1.5.3.RELEASE.</p>
  
  <p>If important: Our services are simple JSON RPC services and the tenant will be present in incoming http requests and set on a thread local by an mvc interceptor. In the JavaEE world we are using webfilters for that.</p>
  
  <p>Thanks a lot for your help!</p>