Skip to Content
0

Access to CloudConnector via Spring Boot

Jun 01, 2017 at 01:15 PM

131

avatar image

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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Tobias Trapp Jun 02, 2017 at 02:09 PM
0

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"...

Share
10 |10000 characters needed characters left characters exceeded
Nikolai Tankov
Jun 01, 2017 at 04:04 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Tobias Trapp Jun 02, 2017 at 07:07 AM
0

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?

Share
10 |10000 characters needed characters left characters exceeded