Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lighty Spring Boot Integration Problem #1737

Open
ychechel opened this issue Jan 30, 2024 · 1 comment
Open

Lighty Spring Boot Integration Problem #1737

ychechel opened this issue Jan 30, 2024 · 1 comment

Comments

@ychechel
Copy link

ychechel commented Jan 30, 2024

Following your Spring integration instructions lighty-io-brings-opendaylight-to-spring-io-developers trying to make lighty RESTCONF and Spring-Web to co exist ON THE SAME PORT

RESTCONF working just fine!!!
http://127.0.0.1:8080/restconf/data/ietf-network-state:networks

The problem is with Spring MVC:
http://127.0.0.1:8080/cw/hello

The thing is that both RESTCONF Lighty Module and Spring-Web are both trying to boot up their own web server.

  • RESTCONF Lighty Module - Jetty
  • SpringWeb-Tomcat (configurable, can use also Jetty)

And obviously they collide on the same port .
I need to tell "RESTCONF Lighty Module " to use Spring-Web server, and i can not find a way to do that .

I can make them start on different ports:

package com.cisco.hco.isim.cnc;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/cw")
public class REST_API_Controller {
    
    @GetMapping(path = "/hello")
    public String serviceStatus() {
        return "Hi There";
    }
}

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
    <title>Error 404 Not Found</title>
</head>

<body>
    <h2>HTTP ERROR 404 Not Found</h2>
    <table>
        <tr>
            <th>URI:</th>
            <td>/cw/hello</td>
        </tr>
        <tr>
            <th>STATUS:</th>
            <td>404</td>
        </tr>
        <tr>
            <th>MESSAGE:</th>
            <td>Not Found</td>
        </tr>
        <tr>
            <th>SERVLET:</th>
            <td>-</td>
        </tr>
    </table>
    <hr /><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.52.v20230823</a>
    <hr />

</body>

</html>
@ihrasko
Copy link
Collaborator

ihrasko commented Feb 5, 2024

Thank you for your report. It has been added into developer's queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants