Skip to Content

Access to CloudConnector via Spring Boot

Hi,

I'm trying to access an on-premise endpoint from SAP Cloud Platform (NEO). It's working fine in general when having the ConnectivityConfiguration listed in web.xml.

We want to use Spring Boot for all our Java Apps and since it is not possible to use the web.xml, I'm not getting the ConnectivityConfiguration.

Already tried several ways to register the ConnectivityConfiguration for being able to get it via JNDI, but nothing worked until now. Any suggestions/solutions?

Thanks in advance!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 02, 2017 at 02:09 PM

    Yeehaw!

    Sounds pretty strange, but for me, the following finally worked:

    Instead of following Spring Boot's convention to but all the resources in Mavens "/resources/static", the context.xml with the Resource definitions MUST be in "/webapps/META-INF". I also tries "/resources/META-INF", "/resources/static/META-INF" and everything I could imagine inside the code, but finally, it seemed to be only the location of "context.xml"...

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2017 at 04:04 PM

    Hi ,

    You can try to use JavaEE @Resource annotation and specify in this annotation the same properties that are specified in the resource-ref in the web.xml.

    Best regards,

    Nikolai.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2017 at 07:07 AM

    Hi Nikolai,

    thanks for your proposal, but my problem is, that the Resource itself is not known to my context.

    So @Resource ends up in a MissingBean Exception and instead of "Name [connectivityConfiguration] is not bound in this Context" that I got before.

    So the core problem is how to tell my environment to provide the ConnectivityConfiguration.

    Did you manage to do that already?

    Add comment
    10|10000 characters needed characters exceeded