-
1. Re: Teiid spring boot exposing OData and also other rest controllers
rareddy Jan 10, 2019 10:08 AM (in response to tamarm)I have not tested with Spring actuator. Can you add a request for this feature at Teiid - JBoss Issue Tracker
-
2. Re: Teiid spring boot exposing OData and also other rest controllers
tamarm Jan 11, 2019 1:20 PM (in response to rareddy)Sure, I will add it.
My question is not only for the actuator.
For example I want to add rest controller in my microservice which is not related to OData.
I want that this rest controller path will be <my-server-url>/api/<rest-controller-path>, and the OData request's path will be <my-server-url>/api/odata.
I saw that Olingo has a support for that ("org.apache.olingo.odata2.path.split" property).
(didn't find any documentation for that "split" for OData version 4)
https://olingo.apache.org/doc/odata2/tutorials/Olingo_Tutorial_Advanced_Service_Resolution.html
Does Teiid have support for that?
-
3. Re: Teiid spring boot exposing OData and also other rest controllers
rareddy Jan 11, 2019 8:21 PM (in response to tamarm)We do not support "split" property, but I am sure Spring Boot will allow you to define two different contexts in a single app, why not use that? You can place odata impl in something like /odata, and your's in /api. If that needs any code changes I can help with that.
-
4. Re: Teiid spring boot exposing OData and also other rest controllers
rareddy Jan 17, 2019 11:08 PM (in response to rareddy)Tamar,
I did find an issue when a separate context being used for odata. I fixed that one for 1.0.2 release. Using this version you can define "server.context-path=/odata" property in the application.properties and have different odata endpoint. Then you can add the actuator spring boot starter for health stuff which will be at root.
I need to look into your /api endpoint next. If you want suggest code enhancements you are welcome, go ahead submit me patch and I will take look.
If you want to enable Actuator and also use root it is possible with Spring to open this on another port. See example here https://www.baeldung.com/spring-boot-actuators in Further Customization section.
Ramesh..
-
5. Re: Teiid spring boot exposing OData and also other rest controllers
rareddy Jan 18, 2019 6:32 PM (in response to rareddy)Looked into this little bit today, I did not find any material that can allow two different contexts from single Spring Boot app, so that means I need to implement something like "split" functionality you mentioned before into Teiid. Go ahead and submit JIRA I can such functionality easily.
-
6. Re: Teiid spring boot exposing OData and also other rest controllers
tamarm Jan 21, 2019 3:10 AM (in response to rareddy)Hi Ramesh,
I created request in JIRA:
[TEIID-5614] Teiid Spring Boot - Enable Spring Actuator and non OData requests - JBoss Issue Tracker
Thanks!
-
7. Re: Teiid spring boot exposing OData and also other rest controllers
tamarm Jan 21, 2019 3:17 AM (in response to rareddy)Actually I used another port in order to resolve this issue, but separating management and application ports is not best practice. I prefer to check "health" on the same port as my app requests.
Here is my configuration that resolved the issue:
server:
port: 8014
context-path: /api/odatamanagement:
port: 8015
context-path: /api