How to use a JNDI resource in Spring Boot Application running on extern Tomcat8

I have a spring boot web-application which is deployed as war file to a Tomcat8 Server.

This Tomcat 8 Server offers the connectivityService over JNDI.

If I consume this service in normal dynamic-web-application it works just fine with this:

Context ctx = null;
try {
    ctx = new InitialContext();
} catch (NamingException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
}
ConnectivityConfiguration configuration = null;
try {
    configuration = (ConnectivityConfiguration) ctx.lookup("java:comp/env/connectivityConfiguration");
} catch (NamingException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

I register the resource in the web.xml with:

<resource-ref>
    <res-ref-name>connectivityConfiguration</res-ref-name>
    <res-type>com.sap.core.connectivity.api.configuration.ConnectivityConfiguration</res-type>
  </resource-ref>

But if try to consume it in my Spring-Boot application it gives me this exception:

javax.naming.NameNotFoundException: Name [connectivityConfiguration] is not bound in this Context. Unable to find [connectivityConfiguration].

In my spring boot there is no web.xml, so how to register the resource?

I tried it to register it in the properties-file, but it gives me the same exception:

spring.datasource.jndi-name=java:comp/env/connectivityConfiguration

I can’t find a solution for my specific case.

I would really appreciate some guidance.

Greetings
Maverin