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

Update to spring-boot 2.0 #58

Closed torsten-liermann closed 6 years ago

torsten-liermann commented 6 years ago

Hi,

Is it possible to update this project to spring-boot 2.0?

Here are my changes for spring-boot 2.0.1 The groovy test still needs to be corrected. Note: @Qualified and name are not necessary if the factory method is named accordingly.

migrateToSpringBoot201.patch.txt

Thanks, Torsten

mkopylec commented 6 years ago

Please create a pull request that contains your changes

torsten-liermann commented 6 years ago

The pull request: https://github.com/mkopylec/charon-spring-boot-starter/pull/60 (Over a week ago I wrote to your o2.pl address.)

mkopylec commented 6 years ago

Done, try version 3.0.0

torsten-liermann commented 6 years ago

Thanks!

Please note: I do not know anything about gradle.

Running gradlew test, I get the following error:

com.github.mkopylec.charon.specification.TracingSpec > Should capture trace while proxying HTTP request when matching mapping exists and URI is /uri/1/sync FAILED
    com.github.tomakehurst.wiremock.client.VerificationException

com.github.tomakehurst.wiremock.client.VerificationException: A request was unmatched by any stub mapping. Closest stub mapping was:  expected:<
GET
/path/7
> but was:<
GET
/path/7
>
    at com.github.tomakehurst.wiremock.client.VerificationException.forSingleUnmatchedRequest(VerificationException.java:43)
    at com.github.tomakehurst.wiremock.client.VerificationException.forUnmatchedNearMisses(VerificationException.java:48)
    at com.github.tomakehurst.wiremock.junit.WireMockRule.checkForUnmatchedRequests(WireMockRule.java:92)

It is more elegant to import dependency management from spring-boot (org.springframework.boot: spring-boot-dependencies) for dependencies like spring-retry, httpclient, micrometer, commons-lang3.

For future versions of spring-boot, it would be more practical if the spring-boot dependencies are 'optional' or 'provided' (maven jargon) and so do not get into the projects as transitive dependencies.

mkopylec commented 6 years ago

Thanks for advice. All tests have pass locally on my machine and on travis CI, it's strange why they failed when you run them.

torsten-liermann commented 6 years ago

This test works for me on Linux, but not on Windows 10 with the same jdk (1.8.0_171)