mkopylec / charon-spring-boot-starter

Reverse proxy implementation in form of a Spring Boot starter.
Apache License 2.0
240 stars 54 forks source link

Working on standalone Jetty server #92

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi,

Is there a way to use charon or configure it to work on a standalone server like Jetty, I'm stuck with the migration no requests reach the proxy.

Thank you in advance.

mkopylec commented 5 years ago

You can use embedded Jetty server like is described here or use a traditional war deployment on Jetty server like is described here.

ghost commented 5 years ago

Hi mkopylec,

Thank you for your answer.

I have already applied the spring recommendations, the application launch well, but HTTP requests don't seem to be linked with the charonconfigurer.

I forgot to mention that I use the webflux version.

Thank you in advance

mkopylec commented 5 years ago

Spring WebFlux is not based on servlet API. I don't know if it is possible to deploy a WebFlux app on standalone Jetty server. This has nothing to do with Charon. You need to find out how to deploy any WebFlux app on Jetty, if it is possible then Charon will work analogically to other app.

ghost commented 5 years ago

Hi mkopylec,

You're right it's a configuration problem but I also did a test with the webmvc version, and unfortunately the result is the same.

I have produced the minimum configuration on this repository. https://github.com/mathieuVi/charon-standalone-jetty

Could you please tell me what's missing.

Thank you in advance

mkopylec commented 5 years ago

I have created a working version here: https://github.com/mkopylec/charon-jetty-standalone

mkopylec commented 5 years ago

Do you still have a problem with that?

ghost commented 4 years ago

Hi mkopylec,

Sorry for the delay, your example work perfectly fine, but I don't understand why you need to use tomcat dependency instead of jetty on your starter.

Thank you

mkopylec commented 4 years ago

This is normal. It is not me, it is Spring Boot's starter which adds tomcat: compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion This intentionall in SB, to make a simple start with the framework. Charon is following this design. More info here: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html

mkopylec commented 4 years ago

If you still need help let me know. I'm closing the issue.